这吊毛新版气死我了,我真怀疑产品经理是百度网盘派到115的卧底,社区里骂了一片还强制喂屎
我让哈基米写了一个油猴脚本以飨众绅士
此脚本在网盘页面只要切到新版本就会切回旧版本
// ==UserScript== // @name 115网盘自动切换旧版 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 检测到115网盘新版页面时,自动无缝切换到旧版。 // @author ChatGPT // @match https://115.com/* // @grant none // @run-at document-start // ==/UserScript== (function() { 'use strict'; // 执行跳转逻辑 function redirectIfNewVersion() { const path = window.location.pathname; // 如果是新版网盘的文件列表页面 (保留 cid 等目录参数) if (path.startsWith('/storage/netdisk')) { const url = new URL(window.location.href); url.pathname = '/'; // 旧版路径为根目录 if (!url.searchParams.has('offset')) { url.searchParams.set('offset', '0'); } window.location.replace(url.href); } // 如果是新版网盘的其他二级页面(如云下载、最近接收等),统一跳回旧版根目录 else if (path.startsWith('/storage/')) { window.location.replace('https://115.com/?cid=0&offset=0&mode=wangpan'); } } // 1. 初始加载时检查(解决直接输入新版网址或刷新页面的情况) redirectIfNewVersion(); // 2. 拦截 History API(解决 Next.js 单页应用内的无刷新跳转) const originalPushState = history.pushState; history.pushState = function() { originalPushState.apply(this, arguments); redirectIfNewVersion(); }; const originalReplaceState = history.replaceState; history.replaceState = function() { originalReplaceState.apply(this, arguments); redirectIfNewVersion(); }; // 3. 监听浏览器的前进/后退操作 window.addEventListener('popstate', redirectIfNewVersion); })();

336319503
回复含违规内容
广东 茂名
只看该作者
举报
336319503
骂 了一次又一次就是要硬给我们吃屎