{"id":117,"date":"2013-12-13T08:19:59","date_gmt":"2013-12-13T08:19:59","guid":{"rendered":"http:\/\/tastaturkind.ch\/?p=117"},"modified":"2013-12-13T08:19:59","modified_gmt":"2013-12-13T08:19:59","slug":"greasemonkey-mp3-player","status":"publish","type":"post","link":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2013\/12\/13\/greasemonkey-mp3-player\/","title":{"rendered":"GreaseMonkey: MP3 Player"},"content":{"rendered":"<p><code>\/\/ ==UserScript==<br \/>\n\/\/ @name          Inline Mp3 Player (Slim)<br \/>\n\/\/ @description\t  Add to every link to an mp3 file on page a slim inline player with Play, Pause & Volume controllers.<br \/>\n\/\/ @namespace     http:\/\/musicplayer.sourceforge.net\/greasemonkey<br \/>\n\/\/ @include       *<\/p>\n<p>\/\/by Fabricio Zuardi (http:\/\/www.hideout.com.br)<br \/>\n\/\/ ==\/UserScript==<\/p>\n<p>(function() {<\/p>\n<p>\tvar page_links = document.links;<br \/>\n\tfor (var i=0; i<page_links.length; i++){\n\t\tif (page_links[i].href.match(\/\\.mp3$\/i)) {\n\t\t\tvar span = document.createElement(\"span\");\n\t\t\tvar url = \"http:\/\/www.ofrick.com\/xspf_player_slim.swf?&#038;song_url=\"+escape(page_links[i].href)+\"&#038;song_title=\"+escape(page_links[i].innerHTML)\n\t\t\tvar width = 320\n\t\t\tvar height = 17\n\t\t\tcode_str = \"\"\n\t\t\tcode_str += \" <object type=\\\"application\/x-shockwave-flash\\\"\\n\" \ncode_str += \"data=\\\"\"+url+\"\\\" \\n\"\n\t\t\tcode_str += \"width=\\\"\"+width+\"\\\" height=\\\"\"+height+\"\\\">\\n\"<br \/>\n\t\t\tcode_str += \"<param name=\\\"movie\\\" \\n\" \ncode_str += \"value=\\\"\"+url+\"\\\" \/>\\n\"<br \/>\n\t\t\tcode_str += \"<param name=\\\"wmode\\\" \\n\" \ncode_str +=\t\"value=\\\"transparent\\\" \/>\\n\"<br \/>\n\t\t\tcode_str += \"<\/object>\\n\"<br \/>\n\t\t\tspan.innerHTML = code_str<br \/>\n\t\t\tpage_links[i].parentNode.insertBefore(span, page_links[i].nextSibling)<br \/>\n\t\t}<br \/>\n\t}<\/p>\n<p>})();<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ ==UserScript== \/\/ @name Inline Mp3 Player (Slim) \/\/ @description Add to every link to an mp3 file on page a slim inline player with Play, Pause &#038; Volume controllers. \/\/ @namespace http:\/\/musicplayer.sourceforge.net\/greasemonkey \/\/ @include * \/\/by Fabricio Zuardi (http:\/\/www.hideout.com.br) &hellip; <a href=\"https:\/\/oliver-frick.ch\/wordpress\/index.php\/2013\/12\/13\/greasemonkey-mp3-player\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":0,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"wp:attachment":[{"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oliver-frick.ch\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}