WME Validator Localization for Illinois

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

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

  1. // ==UserScript==
  2. // @name WME Validator Localization for Illinois
  3. // @namespace https://greasyfork.org/en/users/9555
  4. // @version 1.1.1.7
  5. // @author xanderb
  6. // @description This script localizes WME Validator for Illinois, 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 Highway",
  52. "problemEN": "Illinois uses SR-xx for state and US-xx for national highway names",
  53. "solutionEN": "Rename the Street or Alt Street",
  54. "template": "${state}:${street}#${altStreet[#]}",
  55. "regexp": "/Illinois:.*(Il Hwy |State Hwy |Il-|SH-|State Rd |SR=|State Rte|IL-|ILL-|U[.S.|S|s] [H|h][WY|wy|ighway])/"
  56. },
  57. "129.solutionLink": "W:Illinois",
  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 Illinois",
  70. "problem": "The segment is assigned to another state",
  71. "solutionEN": "Make sure you are editing in IL and change it",
  72. "template": "${state}",
  73. "regexp": "!/Illinois/"
  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": "/Illinois:.*(Cs-|CS-|County Hwy|County Rd|Cr-|Co Rd|Ch-|CH-)/"
  83. },
  84. "132.solutionLink": "W:Highway_naming/USA",
  85. "133.enabled": true,
  86. "133.params": {
  87. "titleEN": "Alley not PLR",
  88. "problemEN": "Alleys should be set to the PLR Road Type",
  89. "solutionEN": "Change Road Type",
  90. "template": "${street}:${typeRank}",
  91. "regexp": "/.*(Alley| Aly):[^7]/"
  92. },
  93. "133.solutionLink": "W:Road_types/USA#Parking_Lot_Road",
  94. "134.enabled": true,
  95. "134.params": {
  96. "titleEN": "City Name on Freeway",
  97. "problemEN": "City names on Freeway segments can cause detours",
  98. "solutionEN": "Remove the City Name",
  99. "template": "${typeRank}:${city}",
  100. "regexp": "/15:.+$/"
  101. },
  102. //Freeway lock
  103. "150.enabled": true,
  104. "150.params": {
  105. // {number} minimum lock level
  106. "n": 5,
  107. },
  108. //Major Highway lock
  109. "151.enabled": true,
  110. "151.params": {
  111. // {number} minimum lock level
  112. "n": 3,
  113. },
  114. //Minor Highway lock
  115. "152.enabled": true,
  116. "152.params": {
  117. // {number} minimum lock level
  118. "n": 3,
  119. },
  120. //Ramp lock
  121. "153.enabled": true,
  122. "153.params": {
  123. // {number} minimum lock level
  124. "n": 2,
  125. },
  126. //Primary Street lock
  127. "154.enabled": true,
  128. "154.params": {
  129. // {number} minimum lock level
  130. "n": 2,
  131. },
  132. //Default US checks
  133. "27.enabled": !0,
  134. "90.enabled": !0,
  135. "106.enabled": !0,
  136. "112.enabled": !1,
  137. "170.enabled": !0,
  138. "170.params": {
  139. regexp: "/^(?!(to) [^a-z])((S|N|W|E) )?[a-z]/"
  140. },
  141. "171.enabled": !0,
  142. "171.solutionLink": "W:Abbreviations_&_Acronyms#Standard_Suffix_Abbreviations"
  143. };