您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto-reloads the WME data model on map moves
- // ==UserScript==
- // @name WME Auto Reload
- // @namespace http://greasemonkey.chizzum.com
- // @description Auto-reloads the WME data model on map moves
- // @include https://*.waze.com/*editor*
- // @include https://editor-beta.waze.com/*
- // @include https://beta.waze.com/*
- // @exclude https://www.waze.com/user/*editor/*
- // @exclude https://www.waze.com/*/user/*editor/*
- // @grant none
- // @version 1.1
- // ==/UserScript==
- /* JSHint Directives */
- /* globals W: true */
- /* jshint bitwise: false */
- /* jshint eqnull: true */
- /* jshint esversion: 6 */
- function warReload()
- {
- var inhibitReload = false;
- inhibitReload = inhibitReload || (document.getElementsByClassName("waze-icon-save ItemDisabled").length == 0);
- inhibitReload = inhibitReload || W.selectionManager.hasSelectedFeatures();
- if(inhibitReload === false)
- {
- W.controller.reload();
- }
- }
- function warInit()
- {
- if(document.location.href.indexOf('user') !== -1)
- {
- return;
- }
- if(typeof W != "undefined")
- {
- if((typeof W.controller != "undefined") && (typeof W.selectionManager != "undefined") && (typeof W.map != "undefined"))
- {
- W.map.events.register("moveend", null, warReload);
- return;
- }
- }
- window.setTimeout(warInit,250);
- }
- warInit();