IGG Games Direct Downloads

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.

Versión del día 29/03/2017. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         IGG Games Direct Downloads
// @namespace    http://tampermonkey.net/
// @version      1.0.2
// @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';

    //Generate only direct links for downloads.
    makeDirectLinks();
    //Comment out if you do want to display minimal theme.
    reformatLayout();

    function reformatLayout() {

        $('#igggamescom-style-css').attr('href', 'https://dl.dropbox.com/s/6rivaxmujgm94f0/newgreen.css');
        $('#igggamescom-core-css').attr('href', 'https://dl.dropboxusercontent.com/s/xzt0csi3mrwepst/newstyle.css');

        $('#header').remove();
        $('#page').css('background', "0");
        $('#page').removeClass('background');
        $("body").removeClass("home blog custom-background  c2right browser-unknown myatu_bgm_body");
        $('.flexslider').remove();
        $('.fixed.c2right #primary-content').css('width', 'auto');
        $('.body.fixed .page-content').css('width', '100%');
        $('#page-ext').css('background', '#34495e');

        window.addEventListener('load', function() {
            //$('.search-form fieldset, .search-form .submit').css('background', '#27ae60');
            $('#main').css('background', '0');
            $('.clearField').css('background', "");
            $('.clearField').css('border', "");
            $('.clearField').css('color', '#C5EFF7');
            $('.clearField').css('font-weight', '900');
            $('#sidebar').remove();
            $('.submit').attr('value', 'Search');
            $('.shadow-left page-content').remove();
            $('.shadow-left').remove();
            window.open = null;
            $('document').onclick = null;
            $('MsoPFwqg').remove();
        }, true);

        var strVar = "";
        strVar += "<div class=\"search-form\" role=\"search\">";
        strVar += "  <form method=\"get\" class=\"search-form clear-block\" action=\"http:\/\/igg-games.com\/\" _lpchecked=\"1\">";
        strVar += "    <input type=\"submit\" class=\"submit\" title=\"Search Website\" value=\"\">";
        strVar += "    <fieldset>";
        strVar += "      <input type=\"text\" name=\"s\" data-default=\"Search Website\" class=\"text alignleft clearField suggestTerms clearFieldBlurred\" value=\"\">";
        strVar += "      <input type=\"hidden\" value=\"submit\">";
        strVar += "    <\/fieldset>";
        strVar += " <\/form>";
        strVar += "<\/div>";
        $("#main-ext").append(strVar);

    }
    function makeDirectLinks() {
        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.
            var base64encoded = allLinks[i].href.split("urls/");
            var newLinks = atob(base64encoded[1]).split("://");
            allLinks[i].setAttribute('href', '//' + newLinks[newLinks.length - 1]);
        }
    }
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。