您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes layer and filter information from WME permalinks
// ==UserScript== // @name WME Permalink cleaner // @version 1.1.0 // @description Removes layer and filter information from WME permalinks // @grant none // @include https://*.waze.com/*/editor* // @include https://*.waze.com/editor* // @include https://*.waze.com/map-editor* // @include https://*.waze.com/beta_editor* // @include https://editor-beta.waze.com* // @copyright Mistraz // @run-at document-start // @namespace https://greasyfork.org/en/users/438047-mistraz // ==/UserScript== (function () { function cleanUrl(loc) { let params = new URL(loc.href).searchParams.entries(); let newParams = []; let hasChanged = false; let newURL = new URL(loc.href); for (const param of params) { if ( param[0] !== "s" && param[0] !== "Filter" && param[0] !== "layers" ) { newParams.push(param); } else { hasChanged = true; } } if (hasChanged) { newURL.search = "?" + newParams.reduce((acc, cur) => acc + `&${cur[0]}=${cur[1]}`, "").substr(1); window.location.href = newURL.href; } } cleanUrl(window.location); }());