Greasy Fork镜像 支持简体中文。

WME Validator Localization for Hawaii

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

  1. // ==UserScript==
  2. // @name WME Validator Localization for Hawaii
  3. // @namespace https://gf.qytechs.cn/users/6605
  4. // @version 1.1.15.2
  5. // @author crazycaveman
  6. // @description This script localizes WME Validator for Hawaii, USA. You also need main package (WME Validator) installed.
  7. // @match https://beta.waze.com/*editor/*
  8. // @match https://www.waze.com/*editor/*
  9. // @exclude https://*.waze.com/*user/editor/*
  10. // @grant none
  11. // @run-at document-start
  12. // ==/UserScript==
  13. //
  14. /*
  15. See Settings->About->Available checks for complete list of checks and their params.
  16.  
  17. Examples:
  18.  
  19. Enable #170 "Lowercase street name" but allow lowercase "exit" and "to":
  20. "170.enabled": true,
  21. "170.params": {
  22. "regexp": "/^((exit|to) )?[a-z]/",
  23. "},
  24.  
  25. Enable #130 "Custom check" to find a dot in street names, but allow dots at Ramps:
  26. "130.enabled": true,
  27. "130.params": {
  28. "titleEN": "Street name with a dot",
  29. "problemEN": "There is a dot in the street name (excluding Ramps)",
  30. "solutionEN": "Expand the abbreviation or remove the dot",
  31. "template": "${type}:${street}",
  32. "regexp": "D/^[^4][0-9]?:.*\\./",
  33. },
  34. *Note: use D at the beginning of RegExp to enable debugging on JS console.
  35. *Note: do not forget to escape backslashes in strings, i.e. use "\\" instead of "\".
  36. */
  37.  
  38. window.WME_Validator_United_States = {
  39. ".country": "United States",
  40. ".codeISO": "US",
  41. ".author": "crazycaveman",
  42. ".updated": "2015-12-21",
  43. ".link": "https://gf.qytechs.cn/en/scripts/15353-wme-validator-localization-for-hawaii",
  44. //Default US checks
  45. "27.enabled": true,
  46. "90.enabled": true,
  47. "106.enabled": true,
  48. "112.enabled": false,
  49. "170.enabled": true,
  50. "170.params": {
  51. "regexp": "/^(?!(to) [^a-z])([SNWE] )?[a-z]/"
  52. },
  53. "171.enabled": true,
  54. "171.params": {
  55. "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]?\\.)|((#|^)\'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/",
  56. "problemEN": "The street name has incorrect abbreviation, or character",
  57. "solutionEN": "Check upper/lower case, a space before/after the abbreviation and the accordance with the abbreviation table. Remove any comma (,), backslash (\\), or semicolon (;)"
  58. },
  59. "171.solutionLink": "W:Abbreviations_and_acronyms/USA#Standard_suffix_abbreviations",
  60. "130.enabled": true,
  61. "130.params": {
  62. "titleEN": "Wrong name for state highway",
  63. "problemEN": "All state highways should be named SR-### in Hawaii",
  64. "solutionEN": "Change name to SR-### (if it is truly a state highway)",
  65. "template": "${state}:#${street}#${altStreet[#]}",
  66. "regexp": "/^Hawaii:.*\\b(?:State (Hwy|R(ou)?te)|SH-)\\b/i"
  67. },
  68. "130.solutionLink": "W:Highway_naming/USA",
  69. "131.enabled": true,
  70. "131.params": {
  71. "titleEN": "Wrong road type",
  72. "problemEN": "All US Highways should be at least Major Highway (except BUS, SPUR, LOOP)",
  73. "solutionEN": "Change the road type to Major Highway",
  74. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  75. "regexp": "/^[1-9][^245]?:.*#(US Hwy |US-)[0-9]+( ALT| BYP| CONN| TRUCK| Scenic| [NSWE])*@/i"
  76. },
  77. "131.solutionLink": "W:Road_types/USA#Major_Highway",
  78. "132.enabled": true,
  79. "132.params": {
  80. "titleEN": "Wrong road type",
  81. "problemEN": "All US BUS, SPUR, LOOP highways and State Highways (except BUS, SPUR, LOOP) should be at least Minor Highway type",
  82. "solutionEN": "Change the road type to Minor Highway",
  83. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  84. "regexp": "/^[1-9][^2-5]:.*#((State Hwy |SR-|SH-|IL-|IN-|K-|LA-|M-|MA-|MO-|MS-|NC-|ND-|NJ-|NV-|NY-|SC-|SD-|TN-|VT-|WIS-)[0-9]+( ALT| BYP| CONN| TRUCK| Scenic| [NSWE])*|(US Hwy |US-)[0-9]+( BUS| LOOP| SPUR)+( [NSWE])?)@/i"
  85. },
  86. "132.solutionLink": "W:Road_types/USA#Minor_Highway",
  87. "133.enabled": true,
  88. "133.params": {
  89. "titleEN": "Wrong road type",
  90. "problemEN": "All State BUS, SPUR, LOOP Highways should be at least Primary Street type",
  91. "solutionEN": "Change the road type to Primary Street",
  92. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  93. "regexp": "/^[1-9][^1-5]:.*#(State Hwy |SR-|SH-|IL-|IN-|K-|LA-|M-|MA-|MO-|MS-|NC-|ND-|NJ-|NV-|NY-|SC-|SD-|TN-|VT-|WIS-)[0-9]+( BUS| LOOP| SPUR)+( [NSWE])?@/i"
  94. },
  95. "133.solutionLink": "W:Road_types/USA#Primary_Street",
  96. "134.enabled": true,
  97. "134.params": {
  98. "titleEN": "Wrong abbreviation",
  99. "problemEN": "Name abbreviation may be incorrect. Abbreviations ALT, BUS, BYP, CONN, LOOP, and SPUR should be in ALL CAPS",
  100. "solutionEN": "Change abbreviation to ALT, BUS, BYP, CONN, LOOP, SPUR, or TRUCK",
  101. "template": "${street}#${altStreet[#]}",
  102. "regexp": "/[0-9]+[A-Z]? ([Aa]lt(ernate)?|[Bb](us(iness)?|yp(ass)?)|[Cc]onn(ector)?|[Ll]oop|[Ss]pur|[Tt]ruck)\\b/"
  103. },
  104. "134.solutionLink": "W:Road_names/USA#United_States_Numbered_Highways",
  105. //Freeway lock
  106. "150.enabled": true,
  107. "150.params": {
  108. // {number} minimum lock level
  109. "n": 4,
  110. },
  111. //Major Highway lock
  112. "151.enabled": true,
  113. "151.params": {
  114. // {number} minimum lock level
  115. "n": 4,
  116. },
  117. //Minor Highway lock
  118. "152.enabled": true,
  119. "152.params": {
  120. // {number} minimum lock level
  121. "n": 3,
  122. },
  123. //Ramp lock
  124. "153.enabled": true,
  125. "153.params": {
  126. // {number} minimum lock level
  127. "n": 4,
  128. },
  129. //Primary Street lock
  130. "154.enabled": true,
  131. "154.params": {
  132. // {number} minimum lock level
  133. "n": 2,
  134. }
  135. };

QingJ © 2025

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