您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Convert in-site http links to https
当前为
// ==UserScript== // @name m-team https fix // @namespace m-team // @version 0.02 // @grant none // @include https://tp.m-team.cc/* // @description Convert in-site http links to https // @description:zh-CN 将站内 http 链接转换为 https // @description:zh-TW 將站內 http 鏈接轉換為 https // ==/UserScript== (function(){ var snapResults = document.evaluate("//a[contains(@href,'http://tp.m-team.cc/')]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); console.log(snapResults.snapshotLength, '----'); for (var i = snapResults.snapshotLength - 1; i >= 0; i--) { var elm = snapResults.snapshotItem(i); console.log(elm.getAttribute('href'),elm.getAttribute('href').replace(/^http:\/\/(tp\.m-team\.cc\/)/i, "https://$1")); elm.setAttribute('href', elm.getAttribute('href').replace(/^http:\/\/(tp\.m-team\.cc\/)/i, "https://$1")); } })()