您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
若Google搜尋結果為手機版的維基百科就改為桌面版網址
// ==UserScript== // @name Google搜尋手機版維基百科改為桌面版網址 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 若Google搜尋結果為手機版的維基百科就改為桌面版網址 // @author Rabbit1345 // @license MIT // @match https://www.google.com/* // @match https://www.google.com.tw/* // @icon https://favicon.yandex.net/favicon/google.com // @grant none // ==/UserScript== (function() { var yuRUbf_length = document.querySelectorAll('.yuRUbf').length; var tjvcx_length = document.querySelectorAll('.tjvcx').length; for (var i = 0; i < yuRUbf_length; i++) { if (document.querySelectorAll('.yuRUbf')[i].innerHTML.includes("m.wikipedia.org")) { document.querySelectorAll('.yuRUbf')[i].innerHTML = document.querySelectorAll('.yuRUbf')[i].innerHTML.replace("m.wikipedia.org","wikipedia.org"); //change URL } } for (var j = 0; j < tjvcx_length; j++) { document.querySelectorAll('.tjvcx')[j].innerHTML = document.querySelectorAll('.tjvcx')[j].innerHTML.replace("m.wikipedia.org","wikipedia.org"); //change text } })();