您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
用于维基百科移动域名自动跳转为pc域名并且自动选择大陆简体,选择大陆简体版本仅限于检测到出现多汉字版本的时候才会启用
当前为
// ==UserScript== // @name 维基百科移动域名自动跳转&自动选择大陆简体 // @version 0.05 // @description 用于维基百科移动域名自动跳转为pc域名并且自动选择大陆简体,选择大陆简体版本仅限于检测到出现多汉字版本的时候才会启用 // @namespace https://gf.qytechs.cn/en/users/30-opsomh // @include https://zh.m.wikipedia.org/* // @include https://zh.wikipedia.org/* // @grant none // @inject-into auto // @run-at document-start // @license 暂无 // ==/UserScript== var url; function getStr(str) { //取中间字符 var res = str.match(new RegExp(`https://zh.(.*?)wikipedia.org/(.*?)/(.*?)$`)); return res ? res : -1; } urla=getStr(window.location.href)[1]; urlb=getStr(window.location.href)[2]; console.log(urla); console.log(urlb); if(urla == `m.` || urlb == `zh-hans`){ window.stop(); url=window.location.href.replace(urla, '').replace(/wikipedia.org\/.*?\//, 'wikipedia.org/zh-cn/'); console.log(url); location.assign(url); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址