Created
August 8, 2012 17:18
-
-
Save to/3296754 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @id www.rbmaradio.com-9a6f2253-11bd-4aa4-9f5c-cadfa1899da0@scriptish | |
// @name RBMA Radio - Add Download Link | |
// @include http://www.rbmaradio.com/shows/* | |
// @run-at window-load | |
// ==/UserScript== | |
var url = unsafeWindow.gon.show.akamai_url; | |
var ul = document.querySelector('.l-more ul'); | |
var li = document.createElement('li'); | |
ul.insertBefore(li, ul.childNodes[0]); | |
var span = document.createElement('span'); | |
span.textContent = 'Files'; | |
li.appendChild(span); | |
var div = document.createElement('div'); | |
div.className = 'links'; | |
li.appendChild(div); | |
[96, 128, 256].forEach(function(rate){ | |
var link = document.createElement('a'); | |
link.href = url + '&cbr=' + rate; | |
link.textContent = rate; | |
link.setAttribute('data-bypass', 'true'); | |
div.appendChild(link); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment