SoundCloud Download Enabler Bookmarklet

Enables the Download Button on SoundCloud Track Pages

[2012/05/07] UPDATE: Does not appear to work on every page; example (tested in Firefox 12 on Windows XP). For a solution that seem to work on every SoundCloud mp3 page, try http://marklets.com/PwnYouTube.aspx - an all-in-one bookmarklet that also works on YouTube and many other media sites, including porn sites.

Source (gist.github.com)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%28function%28a%29%7Bfunction%20f%28a%29%7Bvar%20b%3Da.find%28%22.actionbar%22%29%3Breturn%20b.length%3Fb%3Aa.prepend%28%27%3Cdiv%20class%3D%22actionbar%22%3E%3Cdiv%20class%3D%22actions%22%3E%3Cdiv%20class%3D%22primary%22%3E%3C/div%3E%3C/div%3E%3C/div%3E%27%29%7Dfunction%20e%28a%2Cb%29%7Bvar%20c%3Db.find%28%22.actions%22%29%2Cd%3Dc.find%28%22.download%22%29%3Bd.length%7C%7Cc.prepend%28%27%3Ca%20href%3D%22%27+a.streamUrl+%27%22%20class%3D%22download%20pl-button%22%20download%3D%22%27+a.title+%27%22%20title%3D%22%27+a.title+%27%22%3EDownload%20track%3C/a%3E%27%29%7Dfunction%20d%28a%2Cb%29%7Bvar%20d%3Dnull%3Bb.hasClass%28%22nano%22%29%3Fd%3Df%28b.closest%28%22.track-title%22%29.find%28%22.track%22%29%29.css%28%7BmarginLeft%3A%2218px%22%7D%29%3Ab.hasClass%28%22small%22%29%26%26%28d%3Df%28b.find%28%22.container%22%29%29%29%2Cd%26%26c%28a%2Cd%29%7Dfunction%20c%28a%2Cb%29%7Bvar%20c%3Db.find%28%22.download%2C%20.mock-download%22%29%3Bif%28%21c.length%29%7Bvar%20d%3D%24%28%27%3Ca%20class%3D%22pl-button%20mock-download%22%3E%3Cspan%3EDownload%3C/span%3E%3C/a%3E%27%29.css%28%7BbackgroundImage%3A%22url%28http%3A//soundcloud.com/images/icons_mini.png%3Funicorn26%29%22%2CbackgroundRepeat%3A%22no-repeat%22%2CbackgroundPosition%3A%22-77px%20-236px%22%2CpaddingLeft%3A%2218px%22%7D%29.attr%28%22download%22%2Ca.title+%22.mp3%22%29%3Bb.find%28%22.primary%22%29.append%28d%29%2Cd.attr%28%22href%22%2Ca.streamUrl%29%7D%7Dfunction%20b%28a%29%7Bvar%20b%3D%24.helpers%2Cf%3Db.getPlayerTrack%28b.getPlayerNode%28a%29%29%2Cg%3Da.find%28%22.actionbar%22%29%3B%21f%7C%7C%28a.hasClass%28%22player%22%29%3Fg.length%3Fc%28f%2Cg%29%3Ad%28f%2Ca%29%3Ae%28f%2Ca%29%29%7Dvar%20g%2Ch%2Ci%3Da.querySelectorAll%28%22%5Bdata-sc-track%5D%22%29%3Bfor%28g%3D0%2Ch%3Di.length%3Bg%3Ch%3Bg++%29b%28%24%28i%5Bg%5D%29%29%7D%29%28document%29


Rate it:


Tags:

Comments

Comments so far. Add yours.