您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Extract and open PanoramaIframe location in Google Maps full site when pressing Control + X + S together
当前为
// ==UserScript== // @name OpenGuessr Hack Location Finder // @namespace https://openguessr.com/ // @version 1.8 // @description Extract and open PanoramaIframe location in Google Maps full site when pressing Control + X + S together // @author Duolingo // @license MIT // @match https://openguessr.com/* // @grant none // ==/UserScript== (function () { 'use strict'; // Track pressed keys let controlPressed = false; let xPressed = false; let sPressed = false; // Add an event listener to capture keydown events globally (even when interacting with the iframe) document.addEventListener('keydown', (event) => { // Check if the keypress is for control, x, or s if (event.key === 'Control') controlPressed = true; if (event.key === 'x') xPressed = true; if (event.key === 's') sPressed = true; // When all three keys are pressed, execute the action if (controlPressed && xPressed && sPressed) { // Locate the iframe element by its ID const iframe = document.querySelector('#PanoramaIframe'); if (iframe) { const src = iframe.getAttribute('src'); if (src) { try { // Parse the URL to extract the `location` parameter const url = new URL(src); const location = url.searchParams.get('location'); // Extract "LAT,LONG" if (location) { // Open the full Google Maps URL const mapsUrl = `https://www.google.com/maps?q=${location}`; window.open(mapsUrl, '_blank'); } else { console.error('Location parameter not found in iframe URL.'); } } catch (error) { console.error('Error parsing iframe URL:', error); } } else { console.error('Iframe src attribute not found.'); } } else { console.error('Iframe with ID "PanoramaIframe" not found.'); } // Prevent default browser behavior event.preventDefault(); // Reset keys after action controlPressed = false; xPressed = false; sPressed = false; } }); // Add an event listener to capture keyup events globally (to clear flags) document.addEventListener('keyup', (event) => { if (event.key === 'Control') controlPressed = false; if (event.key === 'x') xPressed = false; if (event.key === 's') sPressed = false; }); // Force the focus back on the document to ensure the key press is always detected window.addEventListener('blur', () => { // Reset all key states when window loses focus controlPressed = false; xPressed = false; sPressed = false; }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址