您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a button to the Owned Caches page to toggle between hiding/showing archived caches
// ==UserScript== // @name Toggle Archived Geocaches // @namespace http://tampermonkey.net/ // @version 0.1 // @description Adds a button to the Owned Caches page to toggle between hiding/showing archived caches // @author Michel ten Voorde // @match https://www.geocaching.com/my/owned.aspx* // @grant none // ==/UserScript== (function() { 'use strict'; var notArchived = 0; $('.MyOwnedCachesTable').before('<a id="toggleArchivedBtn" class="btn btn-primary" style="margin-top: 14px; background-color: #17a2b8" data-show="true"><span id="hideShowToggle">Hide</span> archived caches</a>'); $('#toggleArchivedBtn').click(function() { if ($('#toggleArchivedBtn').data('show') === true) { $('#hideShowToggle').text('Show'); $('#toggleArchivedBtn').data('show', false); $('a.OldWarning').parent().parent().hide(500); if (notArchived === 0) { notArchived = $('table.MyOwnedCachesTable tr.UserOwned').length - $('a.OldWarning').parent().parent().length; $("#ctl00_ContentBody_lbHeading").text($("#ctl00_ContentBody_lbHeading").text() + ", of which " + notArchived + " are active."); } } else { $('#hideShowToggle').text('Hide'); $('#toggleArchivedBtn').data('show', true); $('a.OldWarning').parent().parent().show(500); } }); })();