// ==UserScript== // @name IGG Games Direct Downloads // @namespace http://tampermonkey.net/ // @version 0.1 // @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 // @include http://igg-games.com/* // @grant none // ==/UserScript== (function() { 'use strict'; $('#sidebar').remove(); $('.flexslider').remove(); $('.fixed.c2right #primary-content').css('width', 'auto'); var linkSections; var i = 0; var allLinks = $('a[rel*=\'nofollow\']'); for (i = 0; i < allLinks.length; i++) { linkSections = decodeURIComponent(allLinks[i].href).split('://'); //decodeURLs, then split them up by the url forwarding seperators. if (linkSections.length >= 3) { allLinks[i].setAttribute('href', '//' + linkSections[linkSections.length - 1]); } } window.addEventListener('load', function() { window.open = null; $('document').onclick = null; $('MsoPFwqg').remove(); //disable popup ads. console.log('removed bull shit'); var strVar = ""; strVar += "
"; strVar += "
"; strVar += " "; strVar += "
"; strVar += " "; strVar += " "; strVar += " <\/fieldset>"; strVar += " <\/form>"; strVar += "<\/div>"; $(".page-content").append(strVar); }, false); })();