Remove download delay on APKLeecher

Removes download delay on APKLeecher

目前為 2018-07-23 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Remove download delay on APKLeecher
// @namespace    StephenP
// @version      1.0.0
// @description  Removes download delay on APKLeecher
// @author       StephenP
// @match        https://apkleecher.com/download/dl.php?*
// @match        http://apkleecher.com/download/dl.php?*
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    try{        
        var timeoutDownloader=document.getElementsByClassName("form-group")[0].getElementsByTagName("script");        
        timeoutDownloader=timeoutDownloader[timeoutDownloader.length-1];
        var apklink = "https://apkleecher.com"+timeoutDownloader.innerHTML.substring(timeoutDownloader.innerHTML.lastIndexOf("..") + 2,timeoutDownloader.innerHTML.lastIndexOf('.apk')+4);
        //tries to remove the download timeout with many values because the timeout script doesn't save its id.
        for(var i=0;i<20;i++){
            clearTimeout(i);};
        location.href=apklink;
      }
      catch(err){
        console.log("Something in ApkLeecher page has changed since this script was last edited. To prevent errors, the page has not benn touched. The download will start with the usual delay");
      }
 })();