WME Segment ID Mover

Removes the segment ids from the top of the edit panel and places them at the bottom, as well as moving the segment warnings as well.

  1. // ==UserScript==
  2. // @name WME Segment ID Mover
  3. // @namespace https://fxzfun.com/
  4. // @version 1.0
  5. // @description Removes the segment ids from the top of the edit panel and places them at the bottom, as well as moving the segment warnings as well.
  6. // @author FXZFun
  7. // @match https://*.waze.com/*/editor*
  8. // @match https://*.waze.com/editor*
  9. // @exclude https://*.waze.com/user/editor*
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=waze.com
  11. // @grant none
  12. // @license GNU GPL v3
  13. // ==/UserScript==
  14.  
  15. /* global W */
  16.  
  17. (function() {
  18. 'use strict';
  19.  
  20. function selectionHandler() {
  21. if (W.selectionManager.hasSelectedFeatures()) {
  22. // wait for panel to open
  23. setTimeout(() => {
  24. var idsElement = document.querySelector(".feature-ids-details");
  25. if (idsElement) idsElement.style.display = "none";
  26. // move segment ids to bottom
  27. document.querySelector(".elementHistoryContainer").insertAdjacentElement("beforeBegin", document.querySelector("wz-caption.feature-id"));
  28. document.querySelector("wz-caption.feature-id").classList = "feature-ids-details";
  29.  
  30. // move segment warnings to bottom
  31. document.querySelector(".elementHistoryContainer").insertAdjacentElement("afterEnd", document.querySelector("wz-alerts-group"));
  32. }, 200);
  33. }
  34. }
  35.  
  36. function initialize() {
  37. W.selectionManager.events.register('selectionchanged', this, selectionHandler);
  38. }
  39.  
  40. W?.userscripts?.state?.isReady ? initialize() : document.addEventListener("wme-ready", initialize, { once: true });
  41. })();