// ==UserScript== // @name WME RA Util // @namespace https://greasyfork.org/users/30701-justins83-waze // @version 2022.08.10.01 // @description Providing basic utility for RA adjustment without the need to delete & recreate // @include https://www.waze.com/editor* // @include https://www.waze.com/*/editor* // @include https://beta.waze.com/* // @exclude https://www.waze.com/user/editor* // @require https://greasyfork.org/scripts/24851-wazewrap/code/WazeWrap.js // @author JustinS83 // @grant none // @license GPLv3 // @contributionURL https://github.com/WazeDev/Thank-The-Authors // ==/UserScript== /* global W */ /* global WazeWrap */ /* global OpenLayers */ /* global require */ /* global $ */ /* global _ */ /* global I18n */ /* eslint curly: ["warn", "multi-or-nest"] */ /* non-normal RA color:#FF8000 normal RA color:#4cc600 */ (function() { var RAUtilWindow = null; var UpdateSegmentGeometry; var MoveNode, MultiAction; var drc_layer; let wEvents; //var totalActions = 0; var _settings; const updateMessage = "WME update fixes."; function bootstrap(tries = 1) { if (W && W.map && W.model && require && WazeWrap.Ready) init(); else if (tries < 1000) setTimeout(function () {bootstrap(++tries);}, 200); } bootstrap(); function init(){ injectCss(); UpdateSegmentGeometry = require('Waze/Action/UpdateSegmentGeometry'); MoveNode = require("Waze/Action/MoveNode"); MultiAction = require("Waze/Action/MultiAction"); if(W.map.events) wEvents = W.map.events; else wEvents = W.map.getMapEventsListener(); RAUtilWindow = document.createElement('div'); RAUtilWindow.id = "RAUtilWindow"; RAUtilWindow.style.position = 'fixed'; RAUtilWindow.style.visibility = 'hidden'; RAUtilWindow.style.top = '15%'; RAUtilWindow.style.left = '25%'; RAUtilWindow.style.width = '510px'; RAUtilWindow.style.zIndex = 100; RAUtilWindow.style.backgroundColor = '#FFFFFE'; RAUtilWindow.style.borderWidth = '0px'; RAUtilWindow.style.borderStyle = 'solid'; RAUtilWindow.style.borderRadius = '10px'; RAUtilWindow.style.boxShadow = '5px 5px 10px Silver'; RAUtilWindow.style.padding = '4px'; var alertsHTML = '
'; // start collapse // I put it al the beginning alertsHTML += 'Enable Roundabout Angles
'; //***************** Shift Amount ************************** // Define BOX alertsHTML += 'in'; // Move node OUT alertsHTML += 'out'; alertsHTML += '
in'; // Move node OUT alertsHTML += 'out'; alertsHTML += '