// ==UserScript== // @icon http://www.yimuhe.com/favicon.ico // @name 一木禾网盘净化 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 屏蔽广告/优化下载流程 // @author Avral // @match *://www.yimuhe.com/* // @require http://code.jquery.com/jquery-3.4.1.min.js // @grant none // @run-at document-start // @downloadURL none // ==/UserScript== (function() { 'use strict'; window.adsbygoogle = []; document.onclick = function(){} document.onkeydown = function(){} document.write = function(){} document.writeln = function(){} window.__qy_pop_up_tg = {} setTimeout(function(){ var dlbtn = $('.caocuo a[href*="down-"]')[0]; if (dlbtn != null){ dlbtn.click(); } var yzmdiv = $('#yzm')[0]; if (yzmdiv != null){ yzmdiv.style.display = ''; } var loaddiv = $('#loading')[0]; if (loaddiv != null){ loaddiv.style.display = 'none'; } }, 500); document.putcode = function(e) { var t = document.yzcode.code.value; if (t == "") return alert("请填写验证码。"), !1; $.ajax({ url: "n_downcode.php", type: "post", data: { action: "yz", id: e, code: t }, dataType: "text", error: function() { return alert("提交失败。"), !1 }, success: function(e) { e == 1 ? ($('.download a')[0].click()) : e == 0 ? alert("验证码不正确") : (alert("下载地址已超时,请重新下载。"), window.location.href = "/file-" + e + ".html") } }) } document.down_file = function(e, t, n, r, i, s, o) { var u = document.createElement("iframe"); u.src = "n_dd.php?file_id=" + e + "&userlogin=" + t + "&p=" + s + "&types=" + o + "&file_key=" + n + "&file_name=" + r + "&ser=" + i; u.style.display = "none"; var onl = function(){ //console.log(u.contentWindow.document.getElementById("downs")); window.location.href = u.contentWindow.document.getElementById("downs").href; } if (u.attachEvent){ u.attachEvent("onload", onl); } else { u.onload = onl; } document.body.appendChild(u); } })();