WME Validator North Carolina Localization

This script localizes WME Validator for United States. You also need main package (WME Validator) installed.

目前为 2014-10-27 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name WME Validator North Carolina Localization
  3. // @version 1.2.4
  4. // @description This script localizes WME Validator for United States. You also need main package (WME Validator) installed.
  5. // @match https://editor-beta.waze.com/*editor/*
  6. // @match https://www.waze.com/*editor/*
  7. // @grant none
  8. // @run-at document-start
  9. // @namespace https://gf.qytechs.cn/users/6285
  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": "s18slider",
  40. ".updated": "2014-10-23",
  41. ".link": "TODO: ",
  42. "130.enabled": true,
  43. "130.params": {
  44. "titleEN": "Business Abbreviated Wrong",
  45. "problemEN": "Business Highways should be abbreviated at Bus instead of BUS",
  46. "solutionEN": "Change Highway abbreviation from Bus to BUS",
  47. "template": "${street}",
  48. "regexp": "/!?[0-9] Bus?/"
  49. },
  50. "131.enabled": true,
  51. "131.params": {
  52. "titleEN": "Wrong name on state highway",
  53. "problemEN": "All state highways should be named NC- in North Carolina",
  54. "solutionEN": "Change name to NC-XX",
  55. "template": "${state}:##${street}##${altStreet[0]}##${altStreet[1]}##${altStreet[2]}##${altStreet[3]}##${altStreet[4]}##${altStreet[5]}##${altStreet[6]}##${altStreet[7]}##${altStreet[8]}##${altStreet[9]}",
  56. "regexp": "/^North Carolina:.*##\\b(State Hwy |SR-|SH-)[0-9]{1,3}\\b/i"
  57. },
  58. "131.solutionLink": "W:North_Carolina#Roads",
  59. "132.enabled": true,
  60. "132.params": {
  61. "titleEN": "Wrong road type (Major)",
  62. "problemEN": "All US Highways should be at least Major Highway (except BUS, SPUR, LOOP)",
  63. "solutionEN": "Change the road type to Major Highway",
  64. "template": "${typeRank}#${street}@#${altStreet[0]}@#${altStreet[1]}@#${altStreet[2]}@#${altStreet[3]}@#${altStreet[4]}@#${altStreet[5]}@#${altStreet[6]}@#${altStreet[7]}@#${altStreet[8]}@#${altStreet[9]}@",
  65. "regexp": "/^[1-9](?![245]).*#(?:US Hwy |US-)\\d+(?: [NSWE]| ALT| BYP| CONN| TRUCK| SCN)*@/i"
  66. },
  67. "132.solutionLink": "W:Road_types/USA#Major_Highway",
  68. "133.enabled": true,
  69. "133.params": {
  70. "titleEN": "Wrong road type (Minor)",
  71. "problemEN": "All US BUS, SPUR, LOOP Highways and all State Highways (except BUS, SPUR, LOOP) should be at least Minor Highway type",
  72. "solutionEN": "Change the road type to Minor Highway",
  73. "template": "${typeRank}#${street}@#${altStreet[0]}@#${altStreet[1]}@#${altStreet[2]}@#${altStreet[3]}@#${altStreet[4]}@#${altStreet[5]}@#${altStreet[6]}@#${altStreet[7]}@#${altStreet[8]}@#${altStreet[9]}@",
  74. "regexp": "/^[1-9](?![2-5]).*#(?:(?:State Hwy |SH-|NC-)\\d+(?: [NSWE]| ALT| BYP| CONN| TRUCK| SCN| Scenic)*|(?:US Hwy |US-)\\d+(?: [NSWE]| BUS| LOOP| SPUR)+)@/i"
  75. },
  76. "133.solutionLink": "W:Road_types/USA#Minor_Highway",
  77. "134.enabled": true,
  78. "134.params": {
  79. "titleEN": "Wrong road type (Primary)",
  80. "problemEN": "All State BUS, SPUR, LOOP Highways should be at least Primary Street type",
  81. "solutionEN": "Change the road type to Primary Street",
  82. "template": "${typeRank}#${street}@#${altStreet[0]}@#${altStreet[1]}@#${altStreet[2]}@#${altStreet[3]}@#${altStreet[4]}@#${altStreet[5]}@#${altStreet[6]}@#${altStreet[7]}@#${altStreet[8]}@#${altStreet[9]}@",
  83. "regexp": "/^[1-9](?![1-5]).*#(?:State Hwy |NC-)\\d+(?: [NSWE]| BUS| LOOP| SPUR)+@/i"
  84. },
  85. "134.solutionLink": "W:Road_types/USA#Primary_Street",
  86. "135.enabled": true,
  87. "135.params": {
  88. "titleEN": "Service Road",
  89. "problemEN": "Incorrect Function Class - Do not use Service Road Function Class",
  90. "solutionEN": "Change Function Class to Street",
  91. "template": "${typeRank}",
  92. "regexp": "/^9$/"
  93. },
  94. "135.solutionLink": "W:Road_types/USA#Service_Road",
  95. "150.enabled": true,
  96. "150.params": {
  97. // {number} minimum lock level
  98. "n": 5,
  99. },
  100. "151.enabled": true,
  101. "151.params": {
  102. // {number} minimum lock level
  103. "n": 3,
  104. },
  105. "152.enabled": true,
  106. "152.params": {
  107. // {number} minimum lock level
  108. "n": 2,
  109. },
  110. "153.enabled": true,
  111. "153.params": {
  112. // {number} minimum lock level
  113. "n": 3,
  114. },
  115. "154.enabled": false,
  116. "154.params": {
  117. // {number} minimum lock level
  118. "n": 2,
  119. },
  120. };

QingJ © 2025

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