QShare Auto-redirect

Skips download timer on QShare

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name           QShare Auto-redirect
// @namespace      http://www.mathemaniac.org
// @description    Skips download timer on QShare
// @include        http://*qshare.tld/*
// @version     1.0.0
// ==/UserScript==

var loc = (""+document.location);

if (loc.match(/get\/\d+\/.*\.html$/)) {
    var freeDLLink = document.evaluate('//a[contains(@href,"option=free")]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
    document.location = freeDLLink.href;
}

if (loc.match(/sysm=file_transfer/)) {
    setTimeout(function () {
        unsafeWindow.count_down(0);
        var downloadLink = document.evaluate('//div[@id="download_link"]/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
        document.location = downloadLink.href;
    },10);
}