您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
12/17/2019, 12:27:17 PM
// ==UserScript== // @name Mapping Assist // @namespace Violentmonkey Scripts // @match *://*.ocv-sg-cloud-01.com/* // @match *://*.ocv-sg-cloud-02.com/* // @match *://*.ocv-sg-cloud-03.com/* // @grant none // @version 1.4 // @author - Frank // @description 12/17/2019, 12:27:17 PM // ==/UserScript== var wrongBoolean; var hostname = window.location.hostname; var wrongServer = [ "ocv-sg-cloud-01.com", "ocv-sg-cloud-02.com", "ocv-sg-cloud-03.com" ]; function appendCreatedHref(element, tld) { var href = element.href; var hrefSub = href.search(tld) + 3; var hrefFinal = href.substring(hrefSub, href.length); text.value = text.value + "\n" + hrefFinal; } if (hostname.includes("ocv-sg-cloud")) { wrongServer.forEach(element => { if (element == hostname) { wrongBoolean = true; } }); if (wrongBoolean != true && window.location.pathname.includes('administrator') === false) { var links = document.getElementsByTagName("a"); var arr = [].slice.call(links); const tld = window.location.origin.split(".").pop(); arr.forEach(element => { element.addEventListener("click", function(event) { if (event.ctrlKey) { } else { event.preventDefault(); appendCreatedHref(element, tld); } }); }); var text = document.createElement("textarea"); text.style.cssText = "position:fixed; top:35%; left:0; width:250px; height:100px;"; document.body.appendChild(text); } }