deep9686 / Inline MP3

// ==UserScript==
// @name         Inline MP3
// @namespace    http://divamtech.com/
// @version      0.1
// @description  try to take over the world!
// @author       Deepak A S
// @include       *
// @grant        none
// ==/UserScript==

(function() {

    var page_links = document.links;
    var img = document.createElement("span");
    img.innerHTML = "<hr><br><br><span style=\"margin-left: 18px;\">Inline Mp3 Player By</span><br><img src=\"http://i.imgur.com/LbqjENn.gif\" alt=\"Deepz\" />"
    var j = 0;
    for (var i=0; i<page_links.length; i++){
        if (page_links[i].href.match(/\.mp3$/i)) {
            var span = document.createElement("span");
            var hr = document.createElement("hr");
            var url = escape(page_links[i].href)
            code_str = ""
            code_str += "<object type=\"application/x-shockwave-flash\" data=\"http://flash-mp3-player.net/medias/player_mp3_maxi.swf\" width=\"200\" height=\"22\">"
            code_str += "<param name=\"movie\" value=\"http://flash-mp3-player.net/medias/player_mp3_maxi.swf\" />"
            code_str += "<param name=\"bgcolor\" value=\"#ffffff\" />"
            code_str += "<param name=\"FlashVars\" value=\"mp3=" + url + "&amp;autoload=1&amp;volume=75&amp;showstop=1&amp;showvolume=1\" />"
            code_str += "</object>&nbsp;"
            span.innerHTML = code_str
            page_links[i].parentNode.insertBefore(span, page_links[i])
            page_links[i].parentNode.insertBefore(hr, page_links[i].nextSibling)
            j = i;
        }
    }
    if (page_links[j].href.match(/\.mp3$/i)) {
        page_links[j].parentNode.insertBefore(img, page_links[j].nextSibling)}
})();