// ==UserScript== // @name megaupSkipADBCheck // @namespace http://tampermonkey.net/ // @version 1.3.1 // @description Skip ADB Check,auto download. // @author HaoaW // @match *://download.megaup.net/* // @match *://megaup.net/* // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; if("megaup.net" == location.hostname){ seconds = 0; display(); let dlHref = document.querySelector('.download-timer a.btn.btn-default').href; if(dlHref){ //debugger; location.href=dlHref; } } else if("download.megaup.net" == location.hostname){ var scriptArry =Array.from( document.body.querySelectorAll('script')); scriptArry.forEach((e,i,a)=>{ let ptIndex =e.innerText.indexOf('?pt='); if(ptIndex>0){ //debugger; //排除注释行 let lines = e.innerText.split('\n'); lines.forEach(line => { //debugger; ptIndex = line.indexOf('?pt='); if (//line.trim().startsWith('function') //&& ptIndex > 0) { let start = line.lastIndexOf('http', ptIndex); let end = line.indexOf("'", ptIndex); if (start > 0 && end > 0) { //let url = location.replace(line.substring(start, end)); } } }); } }); } })();