WME Layers Link Remover

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

当前为 2015-12-03 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name 	    WME Layers Link Remover
// @description     removes "&layers=#" from links clicked/opened in Waze
// @namespace 	    vaindil
// @version         0.6.2
// @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://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, '');
}