您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Use this before other scripts
当前为
// ==UserScript== // @name Roll20 Boilerplate v2 // @namespace http://statonions.com // @version 0.2.2 // @description Use this before other scripts // @author Justice Noon // @match https://app.roll20.net/editor/ // @include https://app.roll20.net/assets/* // @run-at document-start // @grant GM_webRequest // @grant GM_unsafeWindow // @webRequest {"selector": "*/assets/app.js?*", "action": "cancel" } //Changelog: Added compatibility for VTT ES / Requires unsafeWindow now. Sorry. // ==/UserScript== (function() { 'use strict'; var readyScript = '', intId; GM_webRequest([{"selector": "*/assets/app.js?*", "action": "cancel" }], function(info, message, details) { console.log(info, message, details); }); var oReq = new XMLHttpRequest(); oReq.addEventListener("load", function() { if (typeof r20es != 'undefined') intId = setInterval(() => {if(d20) {unsafeWindow.d21 = d20; clearInterval(intId);}}, 2000); else readyScript = this.responseText.replace('getPointer,degreesToRadians;', 'getPointer,degreesToRadians;window.d21=d20;'); }); oReq.open("GET", "https://app.roll20.net/assets/app.js"); oReq.send(); const observer = new MutationObserver(mutations => { mutations.forEach(({ addedNodes }) => { addedNodes.forEach(node => { if(node.nodeType === 1 && node.tagName === 'SCRIPT') { const src = node.src || ''; //Load modified app when it would have loaded normally if(src.indexOf('assets/app.js') > -1) { window.eval(readyScript); node.type = 'javascript/blocked'; node.parentElement.removeChild(node); observer.disconnect(); } } }) }) }) observer.observe(document.documentElement, { childList: true, subtree: true }) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址