Skip to content

Instantly share code, notes, and snippets.

@Eptun
Created August 11, 2018 15:46
Show Gist options
  • Save Eptun/2cc76f0940f35dab8c6dceaa3180b940 to your computer and use it in GitHub Desktop.
Save Eptun/2cc76f0940f35dab8c6dceaa3180b940 to your computer and use it in GitHub Desktop.
// ==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");
});
})();
@T1mL3arn
Copy link

Violentmonkey cannot install this script due http protocol in @require jquery link. I changed it to https and this helped me. Please update your gist.

@altbdoor
Copy link

altbdoor commented Sep 13, 2018

Just FYI you could make do without jQuery.

var links = document.querySelectorAll('.gamelist')
for (var i=0; i<links.length; i++) {
    var id = links[i].href.split("/")[3]
    links[i].href = "/roms/get-download.php?gid="+id+"&test=true"
}

And you could utilize @updateURL to automatically update your users.

@daniviro
Copy link

daniviro commented Jan 15, 2019

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