WME Validator Localization for Indiana

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

目前为 2015-07-03 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name WME Validator Localization for Indiana
  3. // @namespace https://gf.qytechs.cn/en/users/9555
  4. // @version 1.1.1.19
  5. // @author xanderb
  6. // @description This script localizes WME Validator for Indiana, 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-03",
  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 or US Highway",
  52. "problemEN": "Indiana uses IN and US for numbered highway names",
  53. "solutionEN": "Rename the Street or Alt Street",
  54. "template": "${state}:${street}#${altStreet[#]}",
  55. "regexp": "/Indiana:.*(In Hwy |State Hwy |In-|SR-|SH-|State Rd |IN=|State Rte |U[.S.|S|s] [H|h][WY|wy|ighway])/"
  56. },
  57. "129.solutionLink": "W:Indiana/Test",
  58. "130.enabled": true,
  59. "130.params": {
  60. "titleEN": "Short Parking Lot",
  61. "problemEN": "Dead End Parking Lot is less that 50 meters",
  62. "solutionEN": "Does it really need to be there?",
  63. "template": "${deadEnd}:${typeRank}:${length}",
  64. "regexp": "/1:7:([0-4]?[0-9])$/"
  65. },
  66. "130.solutionLink": "W:Best_map_editing_practice#Parking_Lots",
  67. "131.enabled": true,
  68. "131.params": {
  69. "titleEN": "Not Indiana",
  70. "problem": "The segment is assigned to another state",
  71. "solutionEN": "Make sure you are editing in Indiana and change it",
  72. "template": "${state}",
  73. "regexp": "!/Indiana/"
  74. },
  75. "131.solutionLink": "W:Creating_and_editing_road_segments#Address_Properties",
  76. "132.enabled": true,
  77. "132.params": {
  78. "titleEN": "Wrong name for City or County street",
  79. "problemEN": "CS and Cs are not read correctly by TTS or County Hwy Name is wrong",
  80. "solutionEN": "Check sources and change the street's name",
  81. "template": "${state}:${street}#${altStreet[#]}",
  82. "regexp": "/Indiana:.*(Cs-|CS-|County Hwy |County Rd |Cr-|Ch-|Co Rd )/"
  83. },
  84. "132.solutionLink": "W:Indiana",
  85. "133.enabled": true,
  86. "133.params": {
  87. "titleEN": "City Name on Freeway",
  88. "problemEN": "City names on Freeway segments can cause detours",
  89. "solutionEN": "Remove the City Name",
  90. "template": "${typeRank}:${city}",
  91. "regexp": "/15:.+$/"
  92. },
  93. "135.enabled": true,
  94. "135.params": {
  95. "titleEN": "Wrong road type (major)",
  96. "problemEN": "All US Highways should be at least Major Highway (except BUS, SPUR, LOOP)",
  97. "solutionEN": "Change the road type to Major Highway",
  98. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  99. "regexp": "/^[1-9][^245]?:.*#(US Hwy |US-)[0-9]+( ALT| BYP| CONN| TRUCK| Scenic| [NSWE])*@/i"
  100. },
  101. "135.solutionLink": "W:Road_types/USA#Major_Highway",
  102. "136.enabled": true,
  103. "136.params": {
  104. "titleEN": "Wrong road type (minor)",
  105. "problemEN": "All US BUS, SPUR, LOOP highways and State Highways (except BUS, SPUR, LOOP) should be at least Minor Highway type",
  106. "solutionEN": "Change the road type to Minor Highway",
  107. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  108. "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"
  109. },
  110. "136.solutionLink": "W:Road_types/USA#Minor_Highway",
  111. "137.enabled": true,
  112. "137.params": {
  113. "titleEN": "Wrong road type (primary)",
  114. "problemEN": "All State BUS, SPUR, LOOP Highways should be at least Primary Street type",
  115. "solutionEN": "Change the road type to Primary Street",
  116. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  117. "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"
  118. },
  119. "137.solutionLink": "W:Road_types/USA#Primary_Street",
  120. "138.enabled": true,
  121. "138.params": {
  122. "titleEN": "Wrong banner abbreviation",
  123. "problemEN": "Banner abbreviation may be incorrect. Abbreviations ALT, BUS, BYP, CONN, LOOP, and SPUR should be in ALL CAPS",
  124. "solutionEN": "Change banner abbreviation to ALT, BUS, BYP, CONN, LOOP, SPUR, or TRUCK",
  125. "template": "${street}#${altStreet[#]}",
  126. "regexp": "/[0-9]+[A-Z]? ([Aa]lt(ernate)?|[Bb](us(iness)?|yp(ass)?)|[Cc]onn(ector)?|[Ll]oop|[Ss]pur|[Tt]ruck)/"
  127. },
  128. "138.solutionLink": "W:Road_names/USA#United_States_Numbered_Highways",
  129. "171.params": {
  130. // {string} regular expression to match incorrect abbreviations
  131. "regexp": "/\\.$/",
  132. },
  133. //Freeway lock
  134. "150.enabled": true,
  135. "150.params": {
  136. // {number} minimum lock level
  137. "n": 4,
  138. },
  139. //Major Highway lock
  140. "151.enabled": true,
  141. "151.params": {
  142. // {number} minimum lock level
  143. "n": 3,
  144. },
  145. //Minor Highway lock
  146. "152.enabled": true,
  147. "152.params": {
  148. // {number} minimum lock level
  149. "n": 3,
  150. },
  151. //Ramp lock
  152. "153.enabled": true,
  153. "153.params": {
  154. // {number} minimum lock level
  155. "n": 2,
  156. },
  157. //Primary Street lock
  158. "154.enabled": true,
  159. "154.params": {
  160. // {number} minimum lock level
  161. "n": 2,
  162. },
  163. //Default US checks
  164. "27.enabled": !0,
  165. "90.enabled": !0,
  166. "106.enabled": !0,
  167. "112.enabled": !1,
  168. "170.enabled": !0,
  169. "170.params": {
  170. regexp: "/^(?!(to) [^a-z])((S|N|W|E) )?[a-z]/"
  171. },
  172. "171.enabled": !0,
  173. "171.solutionLink": "W:Abbreviations_&_Acronyms#Standard_Suffix_Abbreviations"
  174. };

QingJ © 2025

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