WME Validator Localization for Ohio

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

目前为 2015-06-01 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name WME Validator Localization for Ohio
  3. // @namespace https://gf.qytechs.cn/en/users/9555
  4. // @version 1.1.1.25
  5. // @author xanderb
  6. // @description This script localizes WME Validator for Ohio, USA. You also need main package (WME Validator) installed.
  7. // @match https://editor-beta.waze.com/*editor/*
  8. // @match https://www.waze.com/*editor/*
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12. //
  13. /*
  14. See Settings->About->Available checks for complete list of checks and their params.
  15. Examples:
  16. Enable #170 "Lowercase street name" but allow lowercase "exit" and "to":
  17. "170.enabled": true,
  18. "170.params": {
  19. "regexp": "/^((exit|to) )?[a-z]/",
  20. "},
  21. Enable #130 "Custom check" to find a dot in street names, but allow dots at Ramps:
  22. "130.enabled": true,
  23. "130.params": {
  24. "titleEN": "Street name with a dot",
  25. "problemEN": "There is a dot in the street name (excluding Ramps)",
  26. "solutionEN": "Expand the abbreviation or remove the dot",
  27. "template": "${type}:${street}",
  28. "regexp": "D/^[^4][0-9]?:.*\\./",
  29. },
  30. *Note: use D at the beginning of RegExp to enable debugging on JS console.
  31. *Note: do not forget to escape backslashes in strings, i.e. use "\\" instead of "\".
  32. */
  33.  
  34. window.WME_Validator_United_States = {
  35. ".country": "United States",
  36. ".codeISO": "US",
  37. ".author": "xanderb",
  38. ".updated": "2015-06-01",
  39. ".link": "TODO: ",
  40. "128.enabled": true,
  41. "128.params": {
  42. "titleEN": "Bad TTS Street name",
  43. "problemEN": "Streets that start with St and Dr result in TTS reading Street or Drive",
  44. "solutionEN": "Add a period after St or Dr at the beginning of the street name",
  45. "template": "${street}#${altStreet[#]}",
  46. "regexp": "/^([SNEW] )+(St |Dr )|^St |^Dr |Jr /"
  47. },
  48. "128.solutionLink": "W:Abbreviations_and_acronyms#Standard_suffix_abbreviations",
  49. "129.enabled": true,
  50. "129.params": {
  51. "titleEN": "Incorrect State Highway",
  52. "problemEN": "Ohio uses SR for numbered highway names",
  53. "solutionEN": "Rename the Street or Alt Street",
  54. "template": "${state}:${street}#${altStreet[#]}",
  55. "regexp": "/Ohio:.*(Oh Hwy |State Hwy |Oh-|SH-|State Rd |SR=|State Rte |OH-|Sr-)/"
  56. },
  57. "129.solutionLink": "W:Ohio",
  58. "130.enabled": true,
  59. "130.params": {
  60. "titleEN": "Dead-end One-Way",
  61. "ProblemEN": "You can check out anytime you like but you can never leave",
  62. "SolutionEN": "Connect another road or make Two-Way",
  63. "template": "A${deadEndA}:${direction}:B${deadEndB}:${direction}",
  64. "regexp": "/A1:[1|2]|B1:[1|2]/"
  65. },
  66. "131.enabled": true,
  67. "131.params": {
  68. "titleEN": "Not Ohio",
  69. "problem": "The segment is assigned to another state",
  70. "solutionEN": "Make sure you are editing in OH and change it",
  71. "template": "${state}",
  72. "regexp": "!/Ohio/"
  73. },
  74. "131.solutionLink": "W:Creating_and_editing_road_segments#Address_Properties",
  75. "132.enabled": true,
  76. "132.params": {
  77. "titleEN": "Wrong name for City or County street",
  78. "problemEN": "CS and Cs are not read correctly by TTS or County Hwy Name is wrong",
  79. "solutionEN": "Check sources and change the street's name",
  80. "template": "${state}:${street}#${altStreet[#]}",
  81. "regexp": "/Ohio:.*(Cs-|CS-|County Hwy |County Rd |Cr-|Co Rd|Ch-|T-|C-|Co Hwy |CH-|Twp Hwy |TH-)/"
  82. },
  83. "132.solutionLink": "W:Highway_naming/USA",
  84. "133.enabled": true,
  85. "133.params": {
  86. "titleEN": "Alley not PLR",
  87. "problemEN": "Alleys should be set to the PLR Road Type",
  88. "solutionEN": "Change Road Type",
  89. "template": "${street}:${typeRank}",
  90. "regexp": "/.*(Alley| Aly):[^7]/"
  91. },
  92. "133.solutionLink": "W:Road_types/USA#Parking_Lot_Road",
  93. "134.enabled": true,
  94. "134.params": {
  95. "titleEN": "City Name on Freeway",
  96. "problemEN": "City names on Freeway segments can cause detours",
  97. "solutionEN": "Remove the City Name",
  98. "template": "${typeRank}:${city}",
  99. "regexp": "/15:.+$/"
  100. },
  101. "135.enabled": true,
  102. "135.params": {
  103. "titleEN": "County Route Type",
  104. "problemEN": "County Routes should be set to Primary Street minumum",
  105. "solutionEN": "Set the road type to PS or higher",
  106. "template": "${typeRank}:#${street}#${altStreet[#]}",
  107. "regexp": "/[1-9][0,6-9]:.*(CH-|CR-)/"
  108. },
  109. "135.solutionLink": "W:Road_types/USA#Quick_reference_chart",
  110. "136.enabled": true,
  111. "136.params": {
  112. "titleEN": "Wrong road type (major)",
  113. "problemEN": "All US Highways should be at least Major Highway (except BUS, SPUR, LOOP)",
  114. "solutionEN": "Change the road type to Major Highway",
  115. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  116. "regexp": "/^[1-9][^245]?:.*#(US Hwy |US-)[0-9]+( ALT| BYP| CONN| TRUCK| Scenic| [NSWE])*@/i"
  117. },
  118. "136.solutionLink": "W:Road_types/USA#Major_Highway",
  119. "137.enabled": true,
  120. "137.params": {
  121. "titleEN": "Wrong road type (minor)",
  122. "problemEN": "All US BUS, SPUR, LOOP highways and State Highways (except BUS, SPUR, LOOP) should be at least Minor Highway type",
  123. "solutionEN": "Change the road type to Minor Highway",
  124. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  125. "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"
  126. },
  127. "137.solutionLink": "W:Road_types/USA#Minor_Highway",
  128. "138.enabled": true,
  129. "138.params": {
  130. "titleEN": "Wrong road type (primary)",
  131. "problemEN": "All State BUS, SPUR, LOOP Highways should be at least Primary Street type",
  132. "solutionEN": "Change the road type to Primary Street",
  133. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  134. "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"
  135. },
  136. "138.solutionLink": "W:Road_types/USA#Primary_Street",
  137. "139.enabled": true,
  138. "139.params": {
  139. "titleEN": "Wrong banner abbreviation",
  140. "problemEN": "Banner abbreviation may be incorrect. Abbreviations ALT, BUS, BYP, CONN, LOOP, and SPUR should be in ALL CAPS",
  141. "solutionEN": "Change banner abbreviation to ALT, BUS, BYP, CONN, LOOP, SPUR, or TRUCK",
  142. "template": "${street}#${altStreet[#]}",
  143. "regexp": "/[0-9]+[A-Z]? ([Aa]lt(ernate)?|[Bb](us(iness)?|yp(ass)?)|[Cc]onn(ector)?|[Ll]oop|[Ss]pur|[Tt]ruck)/"
  144. },
  145. "139.solutionLink": "W:Road_names/USA#United_States_Numbered_Highways",
  146. //Freeway lock
  147. "150.enabled": true,
  148. "150.params": {
  149. // {number} minimum lock level
  150. "n": 5,
  151. },
  152. //Major Highway lock
  153. "151.enabled": true,
  154. "151.params": {
  155. // {number} minimum lock level
  156. "n": 3,
  157. },
  158. //Minor Highway lock
  159. "152.enabled": true,
  160. "152.params": {
  161. // {number} minimum lock level
  162. "n": 3,
  163. },
  164. //Ramp lock
  165. "153.enabled": true,
  166. "153.params": {
  167. // {number} minimum lock level
  168. "n": 2,
  169. },
  170. //Primary Street lock
  171. "154.enabled": true,
  172. "154.params": {
  173. // {number} minimum lock level
  174. "n": 2,
  175. },
  176. //Default US checks
  177. "27.enabled": !0,
  178. "90.enabled": !0,
  179. "106.enabled": !0,
  180. "112.enabled": !1,
  181. "170.enabled": !0,
  182. "170.params": {
  183. regexp: "/^(?!(to) [^a-z])((S|N|W|E) )?[a-z]/"
  184. },
  185. "171.enabled": !0,
  186. "171.solutionLink": "W:Abbreviations_&_Acronyms#Standard_Suffix_Abbreviations"
  187. };

QingJ © 2025

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