// ==UserScript== // @name ee代下助手 - 海外网盘(免空)一键满速下载 // @name:zh-TW ee代下助手 - 海外免空一鍵滿速下載 // @name:en ee-daixia Helper - Fast FileHost Direct Download // @namespace https://ksrgszk.cn/ // @version 1.2.0 // @description 在 Rapidgator、Nitroflare、KatFile、Keep2Share、Fboom、Turbobit、Filejoker、Uploadgig、Hitfile、DepositFiles、Fikper、Tezfiles、MEGA、MediaFire、Alfafile、Daofile、Wdupload、Takefile、Xubster、Ex-Load、Filespace、FilesMonster、Novafile、Hotlink、Extmatrix、Upstore、Wayshare 等 27 个海外网盘(免空)页面自动添加「使用 ee代下 满速下载」悬浮按钮,一键解析多线路高速直链。 // @description:zh-TW 在 Rapidgator、Nitroflare、KatFile、Keep2Share、Fboom、Turbobit、Filejoker、Uploadgig、Hitfile、DepositFiles、Fikper、Tezfiles、MEGA、MediaFire、Alfafile、Daofile、Wdupload、Takefile、Xubster、Ex-Load、Filespace、FilesMonster、Novafile、Hotlink、Extmatrix、Upstore、Wayshare 等 27 個海外免空頁面自動加入一鍵滿速代下按鈕,支援 IDM / aria2c 多線程下載。 // @description:en Add a floating "Fast Download via ee-daixia" button on 27 FileHost sites including Rapidgator, Nitroflare, KatFile, Keep2Share, Fboom, Turbobit, Filejoker, Uploadgig, Hitfile, DepositFiles, Fikper, Tezfiles, MEGA, MediaFire, Alfafile, Daofile, Wdupload, Takefile, Xubster, Ex-Load, Filespace, FilesMonster, Novafile, Hotlink, Extmatrix, Upstore, and Wayshare. // @author ee代下 // @homepageURL https://ksrgszk.cn/tools/userscript/ // @supportURL https://ksrgszk.cn/help/ // @downloadURL https://raw.githubusercontent.com/815101909/ee-daixia-helper/main/ee-daixia-helper.user.js // @updateURL https://raw.githubusercontent.com/815101909/ee-daixia-helper/main/ee-daixia-helper.user.js // @license MIT // @grant none // @run-at document-idle // @match *://rapidgator.net/* // @match *://*.rapidgator.net/* // @match *://rg.to/* // @match *://*.rg.to/* // @match *://katfile.com/* // @match *://*.katfile.com/* // @match *://katfile.cloud/* // @match *://*.katfile.cloud/* // @match *://nitroflare.com/* // @match *://*.nitroflare.com/* // @match *://nitro.download/* // @match *://*.nitro.download/* // @match *://k2s.cc/* // @match *://*.k2s.cc/* // @match *://keep2share.cc/* // @match *://*.keep2share.cc/* // @match *://turbobit.net/* // @match *://*.turbobit.net/* // @match *://turb.to/* // @match *://*.turb.to/* // @match *://filejoker.net/* // @match *://*.filejoker.net/* // @match *://uploadgig.com/* // @match *://*.uploadgig.com/* // @match *://fboom.me/* // @match *://*.fboom.me/* // @match *://fileboom.me/* // @match *://*.fileboom.me/* // @match *://mega.nz/* // @match *://mediafire.com/* // @match *://*.mediafire.com/* // @match *://alfafile.net/* // @match *://*.alfafile.net/* // @match *://daofile.com/* // @match *://*.daofile.com/* // @match *://wdupload.com/* // @match *://*.wdupload.com/* // @match *://emload.com/* // @match *://*.emload.com/* // @match *://takefile.link/* // @match *://*.takefile.link/* // @match *://xubster.com/* // @match *://*.xubster.com/* // @match *://ex-load.com/* // @match *://*.ex-load.com/* // @match *://container.cool/* // @match *://*.container.cool/* // @match *://filespace.com/* // @match *://*.filespace.com/* // @match *://filesmonster.com/* // @match *://*.filesmonster.com/* // @match *://novafile.org/* // @match *://*.novafile.org/* // @match *://nfile.cc/* // @match *://*.nfile.cc/* // @match *://hotlink.cc/* // @match *://*.hotlink.cc/* // @match *://extmatrix.com/* // @match *://*.extmatrix.com/* // @match *://upstore.net/* // @match *://*.upstore.net/* // @match *://upsto.re/* // @match *://*.upsto.re/* // @match *://wayshare.cc/* // @match *://*.wayshare.cc/* // @match *://hitfile.net/* // @match *://*.hitfile.net/* // @match *://hil.to/* // @match *://*.hil.to/* // @match *://depositfiles.com/* // @match *://*.depositfiles.com/* // @match *://dfiles.eu/* // @match *://*.dfiles.eu/* // @match *://dfiles.ru/* // @match *://*.dfiles.ru/* // @match *://fikper.com/* // @match *://*.fikper.com/* // @match *://tezfiles.com/* // @match *://*.tezfiles.com/* // ==/UserScript== (function () { "use strict"; // 仅在顶层窗口挂载,避免在广告 iframe 中重复注入 if (window.top !== window.self) return; const HOST_ID = "ee-daixia-helper-root"; let dismissedByUser = false; const isResourcePage = () => { const path = window.location.pathname || "/"; return path !== "/" || Boolean(window.location.hash && window.location.hash.length > 1); }; let linkBtn = null; const updateHref = () => { if (!linkBtn) return; const currentUrl = window.location.href; linkBtn.href = `https://ksrgszk.cn/app/proxy?link=${encodeURIComponent(currentUrl)}`; }; const mountButton = () => { if (dismissedByUser) return; const existing = document.getElementById(HOST_ID); if (!isResourcePage()) { if (existing) existing.style.display = "none"; return; } if (existing) { existing.style.display = ""; updateHref(); return; } const host = document.createElement("div"); host.id = HOST_ID; host.style.cssText = "position:fixed;right:20px;bottom:24px;z-index:2147483647;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'PingFang SC','Microsoft YaHei',sans-serif;"; const shadow = host.attachShadow({ mode: "open" }); const style = document.createElement("style"); style.textContent = ` .wrap { display: inline-flex; align-items: center; gap: 6px; padding: 6px; border-radius: 9999px; background: rgba(15, 23, 42, 0.92); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12); backdrop-filter: blur(8px); transition: transform 0.18s ease, box-shadow 0.18s ease; } .wrap:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35), 0 0 0 1px rgba(96, 165, 250, 0.45); } .btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 9999px; background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%); color: #ffffff; font-size: 13px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; letter-spacing: 0.01em; } .btn:hover { filter: brightness(1.08); } .icon { width: 15px; height: 15px; flex-shrink: 0; } .close { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; border-radius: 9999px; background: rgba(255, 255, 255, 0.1); color: #cbd5e1; font-size: 14px; line-height: 1; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; } .close:hover { background: rgba(255, 255, 255, 0.2); color: #ffffff; } `; const wrap = document.createElement("div"); wrap.className = "wrap"; linkBtn = document.createElement("a"); linkBtn.className = "btn"; linkBtn.target = "_blank"; linkBtn.rel = "noopener noreferrer"; linkBtn.title = "跳转到 ee代下中转平台自动填入当前链接解析高速直链"; linkBtn.innerHTML = '使用 ee代下 满速下载'; updateHref(); linkBtn.addEventListener("mouseenter", updateHref); linkBtn.addEventListener("click", updateHref); const closeBtn = document.createElement("button"); closeBtn.type = "button"; closeBtn.className = "close"; closeBtn.title = "隐藏按钮"; closeBtn.setAttribute("aria-label", "隐藏按钮"); closeBtn.textContent = "×"; closeBtn.addEventListener("click", () => { dismissedByUser = true; host.remove(); }); wrap.appendChild(linkBtn); wrap.appendChild(closeBtn); shadow.appendChild(style); shadow.appendChild(wrap); document.body.appendChild(host); }; mountButton(); // 适配 MEGA 等 SPA 单页网盘的路由变化 let lastUrl = window.location.href; const checkUrlChange = () => { if (window.location.href !== lastUrl) { lastUrl = window.location.href; mountButton(); } }; window.addEventListener("popstate", checkUrlChange); window.addEventListener("hashchange", checkUrlChange); setInterval(checkUrlChange, 1500); })();