IGG-Games.com 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.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         IGG-Games.com Direct Downloads
// @namespace    http://tampermonkey.net/
// @version      1.0.8
// @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      https://igg-games.com/*
// @require      http://code.jquery.com/jquery-3.4.1.min.js
// @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', '//' + linkSections[2]);
            }
            if(value.href.indexOf('-download.html') != -1){
                value.setAttribute('target', '_blank');
            }
        });
    }
})();