您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Make the mebedded Street View in the Internet Roadtrip somewhat interactive.
// ==UserScript== // @name Internet Roadtrip Simple Interactive Street View // @namespace jdranczewski.github.io // @match https://neal.fun/* // @version 0.1.3 // @author jdranczewski // @description Make the mebedded Street View in the Internet Roadtrip somewhat interactive. // @license MIT // @run-at document-end // @require https://cdn.jsdelivr.net/npm/[email protected] // ==/UserScript== (async function() { // Get some references const switchFrameOrder = (await IRF.vdom.container).methods.switchFrameOrder; // Changing this in preparation for the breaking changes in IRF 0.5.0 // const refs = (await IRF.vdom.container).$refs; const pano0 = document.getElementById("pano0"); const pano1 = document.getElementById("pano1"); // Execute code AFTER a vue method executes (await IRF.vdom.container).state.switchFrameOrder = new Proxy(switchFrameOrder, { apply: (target, thisArg, args) => { const returnValue = Reflect.apply(target, thisArg, args); // Change the pointer events on the pano that's at the front if (1 === thisArg.currFrame) { pano1.style.pointerEvents = "auto" } else { pano1.style.pointerEvents = "none"; } return returnValue; }, }); // Always enable pointer events for the pano that's at the back pano0.style.pointerEvents = "auto" })();