您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Hides the stuff from myster caches
/* global $: true */ /* global waitForKeyElements: true */ // ==UserScript== // @name Geocaching Puzzle Solution Hider // @description Hides the stuff from myster caches // @match http://www.geocaching.com/geocache/* // @match https://www.geocaching.com/geocache/* // @match http://geocaching.com/geocache/* // @match https://geocaching.com/geocache/* // @match http://www.geocaching.com/play/* // @match https://www.geocaching.com/play/* // @match http://geocaching.com/play/* // @match https://geocaching.com/play/* // @match http://www.geocaching.com/plan/* // @match https://www.geocaching.com/plan/* // @match http://geocaching.com/plan/* // @match https://geocaching.com/plan/* // @match https://www.certitudes.org/* // @match http://www.certitudes.org/* // @version 1.2 // @namespace http://greasyfork.icu/en/scripts/529637-geocaching-puzzle-solution-hider/code // @homepage http://greasyfork.icu/en/scripts/529637-geocaching-puzzle-solution-hider/code // @require http://greasyfork.icu/scripts/383527-wait-for-key-elements/code/Wait_for_key_elements.js?version=701631 // @license MIT // ==/UserScript== (function() { 'use strict'; function hideFirstElementWithClassX(abc) { // Find the first element with class name 'xxx' var element = document.querySelector(abc); // Check if the element exists if (element) { // Hide the element by setting its display style to none element.style.display = 'none'; } } function setDistanceToZero(abc) { // Select all elements with the class 'distance-cell' var elements = document.getElementsByClassName(abc); // Iterate through the selected elements and set their inner text for (var i = 0; i < elements.length; i++) { elements[i].innerText = '0.0 mi'; } } // Call the function to set the distances setDistanceToZero('distance-cell'); setDistanceToZero('list-geocache-distance'); // Call the function to hide the element // hideFirstElementWithClassX(".Note.PersonalCacheNote"); hideFirstElementWithClassX(".LocationData.FloatContainer"); hideFirstElementWithClassX("#coordinate-div"); // hideFirstElementWithClassX("#uxlrgMap"); hideFirstElementWithClassX("#solution"); hideFirstElementWithClassX("#viewCacheNote"); hideFirstElementWithClassX("#map_canvas"); })();