WME Layers Link Remover

removes "&layers=#" from links clicked/opened in Waze

目前为 2015-08-24 提交的版本。查看 最新版本

// ==UserScript==
// @name 	    WME Layers Link Remover
// @description     removes "&layers=#" from links clicked/opened in Waze
// @namespace 	    vaindil
// @version         0.6
// @grant           none
// @include         https://www.waze.com/editor/*&layers=*
// @include         https://www.waze.com/editor/?layers=*
// @include         https://www.waze.com/*/editor/*&layers=*
// @include         https://www.waze.com/editor/?layers=*
// @include         https://editor-beta.waze.com/*&layers=*
// @include         https://editor-beta.waze.com/?layers=*
// @author	    vaindil
// @run-at          document-start
// ==/UserScript==


/*******
 * Some users prefer to not have layers included in permalinks for various reasons.
 * This script removes the "&layers=#" string from the URL to circumvent this.
 * 
 * To the extent possible under law, I (vaindil) have waived all copyright and related
 * or neighboring rights to WME Layers Link Remover. This work is published from: United States.
 * More info: https://creativecommons.org/publicdomain/zero/1.0/
 * 
*******/

window.onload = function() {
    window.stop();
    document.write('<style type="text/undefined">')
    var str = window.location.href;
    window.location.href = str.replace(/&layers=\d*/g, '');
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址