WME Validator Localization for Montana

This script localizes WME Validator for Montana, USA. You also need main package (WME Validator) installed.

  1. // ==UserScript==
  2. // @name WME Validator Localization for Montana
  3. // @version 0.1.10
  4. // @author herrchin
  5. // @description This script localizes WME Validator for Montana, USA. You also need main package (WME Validator) installed.
  6. // @include /^https:\/\/(www|beta)\.waze\.com\/(?!user\/)(.{2,6}\/)?editor.*$/
  7. // @grant none
  8. // @run-at document-start
  9. // @namespace https://gf.qytechs.cn/users/23100
  10. // ==/UserScript==
  11. //
  12. /*
  13. See Settings->About->Available checks for complete list of checks and their params.
  14.  
  15. Examples:
  16.  
  17. Enable #170 "Lowercase street name" but allow lowercase "exit" and "to":
  18. "170.enabled": true,
  19. "170.params": {
  20. "regexp": "/^((exit|to) )?[a-z]/",
  21. "},
  22.  
  23. Enable #130 "Custom check" to find a dot in street names, but allow dots at Ramps:
  24. "130.enabled": true,
  25. "130.params": {
  26. "titleEN": "Street name with a dot",
  27. "problemEN": "There is a dot in the street name (excluding Ramps)",
  28. "solutionEN": "Expand the abbreviation or remove the dot",
  29. "template": "${type}:${street}",
  30. "regexp": "D/^[^4][0-9]?:.*\\./",
  31. },
  32. *Note: use D at the beginning of RegExp to enable debugging on JS console.
  33. *Note: do not forget to escape backslashes in strings, i.e. use "\\" instead of "\".
  34. */
  35.  
  36. window.WME_Validator_United_States = {
  37. ".country": "United States",
  38. ".codeISO": "US",
  39. ".author": "herrchin",
  40. ".updated": "2016-01-17",
  41. ".link": "https://gf.qytechs.cn/en/scripts/16052-wme-validator-localization-for-montana/code",
  42. "27.enabled": true,
  43. "90.enabled": true,
  44. "106.enabled": true,
  45. "112.enabled": false,
  46. // Catch State Hwy, County Rd, Co Rd, etc.
  47. "130.enabled": true,
  48. "130.params": {
  49. "titleEN": "Incorrect State Highway, County Road, or US Highway name",
  50. "problemEN": "Montana uses MT-xxx, State Hwy xxx, and CR-xxx for properly abbreviated road names, and US-#",
  51. "solutionEN": "Rename the Street or Alt Street per Montana Wiki Standards",
  52. "template": "${state}:${street}#${altStreet[#]}",
  53. //"regexp": "/Montana:.*(State [Hh](WY|wy|ighway)|Co(unty)? R(oa)?d|U\\.?[Ss]\\.? [Hh](WY|wy|ighway))/",
  54. //"regexp": "/Montana:.*([Ss][HhRr]-\\d|[Rr]te[- ]\\d|Co(unty)? R(oa)?d|U\\.?[Ss]\\.? [Hh](WY|wy|ighway))/",
  55. "regexp": "/Montana:.*(#(?!State )[Hh](WY|wy|ighway)[- ]\\d|[Ss][HhRr]-\\d|[Rr]te[- ]\\d|Co(unty)? R(oa)?d|U\\.?[Ss]\\.? [Hh](WY|wy|ighway))/",
  56. },
  57. "130.solutionLink": "https://wiki.waze.com/wiki/Highway_naming/USA",
  58. // Roads that have State set to something other than Montana (basemap issue). This will be NOISY outside Montana, so be sure to disable this script when editing elsewhere
  59. "131.enabled": true,
  60. "131.params": {
  61. "titleEN": "State is not set to Montana",
  62. "problemEN": "Some Montana basemap roads are incorrectly set as another state. Also flags other non-MT states (useful near borders)",
  63. "solutionEN": "Verify that you are editing in Montana, then update the State field",
  64. "template": "${state}",
  65. "regexp": "!/^Montana/",
  66. },
  67. // Missing elevations
  68. // "131.enabled": true,
  69. // Montana locking standards
  70. // freeway
  71. "150.enabled": true,
  72. "150.params": {
  73. "n": 4,
  74. },
  75. "150.solutionLink": "https://wiki.waze.com/wiki/Montana#Locking_Standard",
  76. // Ramp
  77. "153.enabled": true,
  78. "153.params": {
  79. "n": 4,
  80. },
  81. "153.solutionLink": "https://wiki.waze.com/wiki/Montana#Locking_Standard",
  82. // MH
  83. "151.enabled": true,
  84. "151.params": {
  85. "n": 3,
  86. },
  87. "151.solutionLink": "https://wiki.waze.com/wiki/Montana#Locking_Standard",
  88. // mH
  89. "152.enabled": true,
  90. "152.params": {
  91. "n": 2,
  92. },
  93. "152.solutionLink": "https://wiki.waze.com/wiki/Montana#Locking_Standard",
  94. // PS
  95. "154.enabled": true,
  96. "154.params": {
  97. "n": 2,
  98. },
  99. "154.solutionLink": "https://wiki.waze.com/wiki/Montana#Locking_Standard",
  100.  
  101.  
  102. "170.enabled": true,
  103. "170.params": {
  104. "regexp": "/^(?!(to) [^a-z])((S|N|W|E) )?[a-z]/"
  105. },
  106. "171.enabled": true,
  107. "171.params": {
  108. "regexp": "/((?!(\\bPhila|\\bPenna|.(\\bWash|\\bCmdr|\\bProf|\\bPres)|..(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|...(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|...(#| )[NEWSR])).{5}\\.|((?!(hila|enna|(\\bWash|\\bCmdr|\\bProf|\\bPres)|.(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|..(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|..(#| )[NEWSR])).{4}|(\\bhila|\\benna))\\.|((?!(ila|nna|(ash|mdr|rof|res)|(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|.(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|.(#| )[NEWSR])).{3}|\\b(ila|nna|ash|mdr|rof|res))\\.|((?!(la|na|(sh|dr|of|es)|(dm|te|pl|aj|gt|e[vc]|\\.R|ov|en|on|pl)|(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|(#| )[NEWSR])).{2}|\\b(la|na|sh|dr|of|es|dm|te|pl|aj|gt|e[vc]|\\.R|ov|en|on|pl))\\.|(#|^)[^NEWSR]?\\.)|(((?!\\b(D|O|L)).|#|^)'(?![sl]\\b)|(#|^)'s|(?!\\b(In|Na)t).{3}'l|(#|^).{0,2}'l)|(Dr|St)\\.(#|$)|,|;|\\\\|((?!\\.( |#|$|R))\\..|(?!\\.( .|#.|$|R\\.))\\..{2}|\\.R(#|$|\\.R))|[Ee]x(p|w)y\\b|\\b[Ee]x[dn]\\b|Tunl\\b|Long Is\\b|Brg\\b/",
  109. "problemEN": "The street name has incorrect abbreviation, or character",
  110. "solutionEN": "Check upper/lower case, a space before/after the abbreviation and the accordance with the abbreviation table. Remove any comma (,), backslash (\\), or semicolon (;)"
  111. },
  112. "171.solutionLink": "W:Abbreviations_and_acronyms/USA#Standard_suffix_abbreviations"
  113. };

QingJ © 2025

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