Javascript 如何在两个不同的网站上使用它
我遇到了这样的问题,例如,如何从一个web url获取信息并在另一个url中使用它Javascript 如何在两个不同的网站上使用它,javascript,crosstab,tampermonkey,Javascript,Crosstab,Tampermonkey,我遇到了这样的问题,例如,如何从一个web url获取信息并在另一个url中使用它 /==UserScript== //@name测试 //@description尝试接管世界! //@author You //@version 0.1 //@grant GM_setValue //@grant GM_getValue //@grant GM_openInTab //@grant GM_SuperValue //@包括https://tynachofinder.ge/* //@包括https:/
/==UserScript==
//@name测试
//@description尝试接管世界!
//@author You
//@version 0.1
//@grant GM_setValue
//@grant GM_getValue
//@grant GM_openInTab
//@grant GM_SuperValue
//@包括https://tynachofinder.ge/*
//@包括https://tynachofinder.ge/finder/*
//@需要http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
//@需要https://userscripts-mirror.org/scripts/source/107941.user.js
//==/UserScript==
GM.setValue(“discord”,document.querySelector(“site btn”).innerText);
document.querySelector(“.header section.clearfix”)。innerHTML=(
GM.getValue(“不和谐”)
);
像这样的事情如何让它工作你期望的结果是什么,会发生什么?在get/setValue-statements之前,您的代码似乎缺少一个
if(location.href==…)
。您期望的结果是什么,会发生什么?在get/setValue语句之前,您的代码似乎缺少一个if(location.href==…)
。