Last active
October 20, 2018 15:24
-
-
Save Drethek/1363c7855037959fe0a9ad6e4005c6df 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 IGG-Games.com Direct Downloads | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0.6 | |
// @description IGG Games download links all contain multiple forwarders before you get the actual download link. This automatically re-formats each available download link to be direct. | |
// @author MooreR [http://moorer-software.com] | |
// @include http://igg-games.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var linkSections; | |
var i = 0; | |
var allLinks = $('a'); | |
if(allLinks.length != 0){ | |
$.each( allLinks, function( key, value ) { | |
if(value.href.indexOf('xurl=') != -1){ | |
//console.log(value.href); | |
var linkSections = value.href.split('://'); | |
value.setAttribute('href', '//' + decodeURIComponent(linkSections[2])); | |
} | |
}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment