Created
August 11, 2018 15:46
-
-
Save Eptun/2cc76f0940f35dab8c6dceaa3180b940 to your computer and use it in GitHub Desktop.
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 EmuParadise download script | |
// @version 1 | |
// @description Downloads games directly after clicking their name | |
// @author Eptun | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// @match https://www.emuparadise.me/*/*/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
$(".gamelist").each(function(i) { | |
var id = $(this).attr('href').split("/")[3]; | |
$(this).attr('href', "/roms/get-download.php?gid="+id+"&test=true"); | |
}); | |
})(); |
it changed a bit, now the id is in the 5th position
var links = document.querySelectorAll('.gamelist')
for (var i=0; i<links.length; i++) {
var id = links[i].href.split("/")[5]
links[i].href = "/roms/get-download.php?gid="+id+"&test=true"
}
but it stills the same idea
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just FYI you could make do without jQuery.
And you could utilize
@updateURL
to automatically update your users.