Created
April 25, 2017 18:53
-
-
Save emoryy/d8fa19942139d40dac8157b4bf9654fe to your computer and use it in GitHub Desktop.
AnimeAddicts Direct Music Download Links
This file contains 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== | |
// @name AnimeAddicts Music Download links | |
// @namespace hu.emoryy | |
// @include http://animeaddicts.hu* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
try { | |
const links = $('[onclick^=flowplayer_play]'); | |
Array.from(links).forEach(function(link) { | |
const mp3url = link.getAttribute('onclick') | |
.replace("flowplayer_play('", '') | |
.replace("','player','clip_title');", ''); | |
const newA = document.createElement("a"); | |
newA.setAttribute('href', mp3url.trim()); | |
newA.setAttribute('download', ''); | |
newA.textContent = "[🢃]"; | |
link.after(newA); | |
}); | |
} catch (e) { | |
console.error(e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment