WME URComments (Stable)

This script is for replying to user requests the goal is to speed up and simplify the process. Thanks to Chat Jumper and URO+!

2015-11-05 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

  1. // ==UserScript==
  2. // @name WME URComments (Stable)
  3. // @description This script is for replying to user requests the goal is to speed up and simplify the process. Thanks to Chat Jumper and URO+!
  4. // @namespace RickZabel@gmail.com
  5. // @grant none
  6. // @grant GM_info
  7. // @version 1.4.6
  8. // @match https://editor-beta.waze.com/*editor/*
  9. // @match https://www.waze.com/*editor/*
  10. // @author Rick Zabel '2014
  11. // @license MIT/BSD/X11
  12. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQyQjZDNjdEODYzODExRTRBRDY0Q0I2QjA1MjU4N0EyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQyQjZDNjdFODYzODExRTRBRDY0Q0I2QjA1MjU4N0EyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDJCNkM2N0I4NjM4MTFFNEFENjRDQjZCMDUyNTg3QTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDJCNkM2N0M4NjM4MTFFNEFENjRDQjZCMDUyNTg3QTIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6++Bk8AAANOElEQVR42tRZ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
  13. // ==/UserScript==
  14. //URO+ in order for the URO pop up not to be over the ur pin change the URO+ script find all 4 uroPopupX = markerXY.x + popupXOffset; and change it to uroPopupX = markerXY.x + popupXOffset + 40;
  15. //to make this script find open URs faster change the number 1000 to something smaller this is in milliseconds 1000 = 1 second
  16. //line 892 it looks like this setTimeout(URComments.LookForOpenedUR, 1000); // 1 second search
  17. //line 892 it looks like this setTimeout(URComments.LookForOpenedUR, 500); // .5 second search
  18. var URCommentVersion = "1.4.6"; //branched from 0.9.3
  19. var URCommentUpdateMessage = "yes"; // yes alert the user, no has a silent update.
  20.  
  21. /* Changelog
  22. The change log has been moved to https://docs.google.com/spreadsheets/d/1PM4bOYGJxL82E4th2yy87ZzQKpMDF4N1dcKZ2evXc5o/edit?usp=sharing
  23. This sheet will now be used to also track editor requests, to add a request please pm me on waze at rickzabel
  24. */
  25.  
  26. //here is my todo; remove ur count, instruction link in new window
  27.  
  28. var URCommentVersionUpdateNotes = "UR Comments has been updated to " + URCommentVersion;
  29. URCommentVersionUpdateNotes = URCommentVersionUpdateNotes + "\n" + "Please read the posting about version 1.4.6 before using the script while editing. -RickZabel";
  30.  
  31. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  32. //////
  33. ////// Define items that need to be at the root level so they can be used inside functions
  34. //////
  35. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  36.  
  37. //use this for counting how many times we waited for waze to finish a task..
  38. //currently used to write to the console so the code is easier to debug
  39. //in the future we might do actions if we waited to long
  40. var PauseCount = "1";
  41.  
  42. //these are the names of the comments lists built into the script and will show up in the comment list drop down
  43. var BoilerPlateCreatorsArray = [
  44. "CommentTeam",
  45. "Custom",
  46.  
  47. "BrazilianPortuguese", //maintained Murilo-Carvalho mcarvalho79&gmail.com https://greasyfork.org/en/scripts/7292-wme-ur-comments-brazilianportuguese-list
  48. "Czech", //maintained by Zirland zirland&gmail.com
  49. "Dutch", //maintained by moweez moweeznh&gmail.com updated https://greasyfork.org/nl/scripts/7276-wme-ur-comments-dutch-list
  50. "IndonesianBahasa", //maintained by projectronic https://greasyfork.org/en/scripts/13197-wme-urcomments-bahasa-indonesia
  51. "International", //maintained by moweez moweeznh&gmail.com updated
  52. "IsraeliHebrew", //maintained by crayzee, ktamir&gmail.com updated https://greasyfork.org/en/scripts/8682-wme-urcomments-hebrew-list
  53. "Spanish", //maintained by carloslaso carloslaso&gmail.com https://greasyfork.org/en/scripts/7279-wme-ur-comments-spanish-list
  54. //"Italian", //maintained by Fabianotkd, fabiano.fumarola&gmail.com
  55.  
  56. "---User's Lists---",
  57. "PesachZ" //maintained by PesachZ https://greasyfork.org/en/scripts/7272-wme-ur-comments-pesachz-list
  58. //"orbit" //https://greasyfork.org/en/users/8079-orbit
  59.  
  60. ];
  61.  
  62. //get the SelectedBoilerPlateCreator
  63. var SelectedBoilerPlateCreator = localStorage.getItem('BoilerPlateCreators');
  64. //console.log( SelectedBoilerPlateCreator);
  65.  
  66. //if the comment list hasn't been chosen default to the CommentTeam's list
  67. if (SelectedBoilerPlateCreator === "" || SelectedBoilerPlateCreator === null || SelectedBoilerPlateCreator === "rickzabel") {
  68. SelectedBoilerPlateCreator = "CommentTeam";
  69. localStorage.setItem('BoilerPlateCreators', SelectedBoilerPlateCreator);
  70. //localStorage.setItem('BoilerPlateCreators', 'CommentTeam');
  71. }
  72.  
  73. //array that holds the comments
  74. var URCommentsArray = [];
  75.  
  76. //these are the holders for the position in the comments list that the reminder and close messages are at
  77. var ReminderPosistion = "";
  78. var CloseNotIdentifiedPosistion = "";
  79.  
  80.  
  81. var def_names = []; //default waze message array
  82. var URC_Text = []; //URC text
  83. var URC_Text_tooltip = []; //URC tool-tip text
  84. var URC_USER_PROMPT = []; //URC Alerts, Confirmations, and orange box messages
  85.  
  86. //waze swaps out the close button on the UR window after you click send. we use this to grab the close and compare to the new one
  87. var CloseButtonHolder = "";
  88. //since we are scanning for open UR I need to keep track of the current urID so the comments can be overridden
  89. var UrCommentLasturID = "";
  90.  
  91. //this is used to hold the info about the previous tab, before we auto switched tabs
  92. var PreviousTab = null;
  93.  
  94. //used to track if we are switching languages
  95. var ChangeLanguage = false;
  96.  
  97. //return to zoom instead of zoom 0
  98. var ReturnToCurrentZoom = "";
  99.  
  100. var UrCommentsIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQyQjZDNjdEODYzODExRTRBRDY0Q0I2QjA1MjU4N0EyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQyQjZDNjdFODYzODExRTRBRDY0Q0I2QjA1MjU4N0EyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDJCNkM2N0I4NjM4MTFFNEFENjRDQjZCMDUyNTg3QTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDJCNkM2N0M4NjM4MTFFNEFENjRDQjZCMDUyNTg3QTIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6++Bk8AAANOElEQVR42tRZ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";
  101.  
  102. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  103. //////
  104. ////// bootstrap
  105. //////
  106. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  107.  
  108.  
  109. function urcToConsole(logtext) {
  110. //console.log('URComments: '+logtext);
  111. }
  112.  
  113. //now we use this to load the arrays, but we wait till the me tab loads, this gives the custom comments file a chance to also load
  114. function URComments_bootstrap() {
  115. //urcToConsole("Test");
  116. //get the SelectedBoilerPlateCreator
  117. var SelectedBoilerPlateCreator = localStorage.getItem('BoilerPlateCreators');
  118.  
  119. /////////////////////////////////////////////////////////////////////////////////////////////////////////////
  120. // these is the array used to store the ur comments
  121. // comment arrays should follow the format
  122. // "Title", * is what will show up in the ur comment tab
  123. // "comment", * is the comment that will be sent to the user currently
  124. // "URStatus" * this is action to take when the option "Auto Click Open, Solved, Not Identified" is on.
  125. // after clicking send it will click one of those choices. usage is. "Open", or "Solved",or "NotIdentified",
  126. /////////////////////////////////////////////////////////////////////////////////////////////////////////////
  127.  
  128. if (SelectedBoilerPlateCreator === "CommentTeam") {
  129.  
  130. URCommentsArray = [
  131. "No further communication",
  132. "No further information was received and the request is being closed. As you travel, please feel welcome to report any map issues you encounter. Thanks!",
  133. "Solved", //t0cableguy 12/8/14 //rickzabel 12/8/14 , karlcr9911 12/8/14
  134.  
  135. "Fixed",
  136. //"Thanks to your report we've found and fixed a problem with the map. The fix should reach handheld devices within a few days, but on rare occasions it can take closer to a week.",//karlcr9911 12/7/14 //removed an extra space at the end - rickzabel 12/7/14 t0cableguy 12/8/14
  137. //"Thanks to your report we've found and fixed a problem with the map. The fix should reach mobile devices within a few days. On rare occasions it can take closer to a week.", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  138. "Thanks to your report we have found and fixed a problem with the map. The fix should reach mobile devices within a few days. On rare occasions it can take closer to a week.", //GizmoGuy 4/13/15
  139. "Solved",
  140.  
  141. "Address Adjustments",
  142. //"Thanks! The address has been adjusted. This should reach handheld devices within a few days, but on rare occasions it can take closer to a week.",
  143. "Thanks! The address has been adjusted. This should reach mobile devices within a few days. On rare occasions it can take closer to a week.", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  144. "Solved",
  145.  
  146. "Address in correct spot",
  147. "The live map is currently showing your address in the correct spot. Please remove any instance of this address from your history and favorites by tapping the 'i' within the blue circle and then 'remove from history'. Then search for the address. If you don't remove the old results from your navigation or favorites, you will continue to be routed to the old coordinates. Please submit another report if this does not resolve your issue. Thanks!",
  148. "Solved", //karlcr9911 rickzabel 4/3/2015
  149.  
  150. "The road has been closed",
  151. //"Thank you for your report, the road has been closed.",
  152. //"Volunteer responding - Thank you for your report, the road has been closed.", //rickzabel 1211/14
  153. "Volunteer responding - Thank you for your report. The road has been closed.", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  154. "Solved", //requested by SkiDooGuy //changed to NotIdentified by karlcr9911 4/3/2015 //7/22/2015 changed to Solved by karlcr9911
  155.  
  156. "Address fishing",
  157. //"Waze does not tell us your starting or ending destinations. Would you tell us the address you are having problems with as you entered it into Waze? Thanks!"
  158. //"Waze does not tell us your starting or ending destinations. Would you please tell us the destination name and address you are having problems with? Thanks!", //t0cableguy 12/7/14, karlcr9911 12/7/14
  159. //"Waze does not tell us your starting or ending destinations. Would you please tell us the destination name and address you are having problems with? Thanks!",
  160. //this is going to be the message we voted on above! rickzabel 12/8/14
  161. "Waze does not tell us your starting or ending destinations. Would you tell us your destination as you entered it into Waze? Thanks!", //rickzabel i use this one after i sent a message with Volunteer responding 1
  162. "Open",
  163.  
  164. "Errors with no text",
  165. //"Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!", //karlcr9911 12/7/14 //rickzabel 12/7/14 //t0cableguy 12/7/14
  166. "Volunteer responding - Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!", //rickzabel 12/8/14
  167. "Open",
  168.  
  169. "Reminder message", //do not change (rickzabel)
  170. //"Just a reminder: We have not received a response on your report. If we don't hear back from you soon we will infer everything is okay and close the report. Thanks!", //karlcr9911 12/7/14 //this has been getting me the most responses, but it probably is the special link i am including with the UR layer enabled rickzabel 12/7/14 t0cableguy 12/8/14
  171. "Just a reminder: We have not received a response on your report. If we don't hear back from you soon, we will infer everything is okay and close the report. Thanks!", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  172. "Open",
  173.  
  174. "No reply close message",
  175. //"The problem was unclear and volunteers didn't receive a response so we are closing this report. As you travel, please feel welcome to report any map issues you encounter. Thanks!",//karlcr9911 12/7/14 //rickzabel 12/7/14 t0cableguy 12/8/14
  176. "The problem was unclear and volunteers didn't receive a response, so we are closing this report. As you travel, please feel welcome to report any map issues you encounter. Thanks!", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  177. "NotIdentified",
  178.  
  179. "App Bug",
  180. "Unfortunately, In this situation, there is nothing wrong with the map that we can adjust to prevent issues with the app. Please report this to https://support.google.com/waze/answer/6090951?hl=en",
  181. "NotIdentified", //twintiggrz, t0cableguy, rickzabel 3/15/2015
  182.  
  183. "Bad GPS",
  184. "Volunteer responding - It appears that your device was having GPS trouble. GPS signals do not travel through vehicles or tall buildings. Please make sure your device is somewhere with a clear view of the sky.", //rickzabel 12/18/2014
  185. "NotIdentified",
  186.  
  187. "Valid Route",
  188. //"We reviewed the issue and did not find any map errors. It looks like Waze provided a valid route. If you feel yours is correct, keep driving that way. If it is indeed faster, Waze will learn from your drives and route you and others the faster route. Thanks!", //karlcr9911 12/7/14
  189. //"We reviewed the issue and did not find any map errors. It looks like Waze provided you with a valid route. If you feel yours is correct, keep driving that way. If it is indeed faster, Waze will learn from your drives and route you and others the faster route. Thanks!", //added "you with" rickzabel 12/7/14
  190. //"We reviewed the issue and did not find any map errors. It looks like Waze provided you with a valid route. Try the Waze suggested route a few times, it may turn out to actually be faster, if not you'll be teaching Waze that that route is slower, and your route will become preferred " //Pesach 12/8/14
  191. //"Volunteer responding - We reviewed the issue and did not find any map errors. It looks like Waze provided you with a valid route. Try the Waze suggested route a few times, it may turn out to actually be faster, if not you'll be teaching Waze that that route is slower, and the faster route will become preferred.", //rickzabel 12/8/14, karlcr9911 12/8/14
  192. "Volunteer responding - We reviewed the issue and did not find any map errors. It looks like Waze provided you with a valid route. Try the Waze suggested route a few times, as it may turn out to actually be faster. If not you'll be teaching Waze that that route is slower, and the faster route will become preferred.", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  193. "NotIdentified",
  194.  
  195. "Valid Left turns",
  196. //"Volunteer responding - If you wait and complete the left turn, it may actually be faster than the alternative. If it’s not faster, you wait time will contribute to Waze’s database, thus helping to discourage the routing server from suggesting left turns at that intersection. We also suggest if you do not feel comfortable making such left turns, you can always go another route and let Waze recalculate.", //rz 2/26/15
  197. "Volunteer responding - If you wait and complete the left turn, it may actually be faster than the alternative. If it’s not faster, your wait time will contribute to Waze’s database, thus helping to discourage the routing server from suggesting left turns at that intersection. We also suggest if you do not feel comfortable making such left turns, you can always go another route and let Waze recalculate.", //karlcr9911 4/4/15 //rickzabel 4/5/15
  198. "NotIdentified",
  199.  
  200. "Valid Left turns 2",
  201. //"Volunteer responding – We do not disable legal turns only because they are difficult. If you wait and complete the left turn, it may actually be faster than the alternative. If it’s not faster, you wait time will contribute to Waze’s database, thus helping to discourage the routing server from suggesting left turns at that intersection. We also suggest if you do not feel comfortable making such left turns, you can always go another route and let Waze recalculate.", //rz 2/26/15
  202. "Volunteer responding – We cannot disable legal turns only because they are difficult. If you wait and complete the left turn, it may actually be faster than the alternative. If it’s not faster, your wait time will contribute to Waze’s database, thus helping to discourage the routing server from suggesting left turns at that intersection. We also suggest if you do not feel comfortable making such left turns, you can always go another route and let Waze recalculate.", //karlcr9911 4/4/15 //rickzabel 4/5/15
  203. "NotIdentified",
  204.  
  205. "Valid but Difficult Route",
  206. //"Volunteer responding – We do not disable legal routes only because they are difficult. If you wait and complete the route, it may actually be faster than the alternative. If it’s not faster, you wait time will contribute to Waze’s database, thus helping to discourage the routing server from suggesting the route. We also suggest if you do not feel comfortable, you can always go another route and let Waze recalculate."', //rz 2/26/15
  207. "Volunteer responding – We cannot disable legal routes only because they are difficult. If you wait and complete the route, it may actually be faster than the alternative. If it’s not faster, your wait time will contribute to Waze’s database, thus helping to discourage the routing server from suggesting the route. We also suggest if you do not feel comfortable, you can always go another route and let Waze recalculate.", //karlcr9911 4/4/15 //rickzabel 4/5/15
  208. "NotIdentified",
  209.  
  210. "Missing place",
  211. "Volunteer responding - Thank you for reporting a missing place. Anytime you find a a place that is missing from the waze app you can add it from the app by tapping the Pin icon > Place. After taking a picture of the place please add as many details as you can. Thanks!",
  212. "NotIdentified",
  213.  
  214.  
  215. "California double yellow",
  216. "Volunteer responding, In California it is perfectly legal to make a left turn across one double yellow line. Turning across two double yellow lines, spaced apart 2 feet or more, is considered a barrier, and is illegal to cross. Thanks!", //rz 2/26/15 //karlcr9911 4/4/15
  217. "NotIdentified",
  218.  
  219. "Detours / Odd-Routing",
  220. //"We can't find anything in the map to explain route Waze gave you. Waze wants to save you time every way it can and sometimes it suggests complex detours just to shave a few seconds off your trip. Waze may recommend a detour even after the traffic has cleared up because: it doesn't know yet, other Wazers may have reported a temporary street closure, or daily traffic patterns. In any event, we are very sorry to say that the volunteer map editors can't be much help here. Thanks!",
  221. //"We can't find anything on the map to explain route Waze gave you. Waze tries to save you time and sometimes suggests complex detours just to shave a few seconds off your trip. We are very sorry to say that the volunteer map editors can not be much help here. Thanks!", //rickzabel 12/7/14
  222. //"We can't find anything on the map to explain the route Waze gave you. Waze will route complex detours to save a few seconds. We are very sorry to say that map editors can not be helpful in this situation. Thanks!", //t0cableguy 12/7/14 //rickzabel 12/7/14 //karlcr9911 12/8/14
  223. //"Volunteer responding - We can't find anything on the map to explain the route Waze gave you. Waze will route complex detours to save a few seconds. We are very sorry to say that map editors can not be helpful in this situation. Thanks!", //rickzabel 12/11/14
  224. "Volunteer responding - We can't find anything on the map to explain the route Waze gave you. Waze will route complex detours to save a few seconds. We are very sorry to say that map editors cannot be helpful in this situation. Thanks!", //rickzabel 4/18/20115
  225. "NotIdentified",
  226.  
  227. "Overall Waze complaint",
  228. "Volunteer responding - You can help make Waze better by reporting problems as you find them. Please include as many details as possible? Thanks!",
  229. "NotIdentified", //rickzabel Pesach 12/22/14
  230.  
  231. "Report to local municipality",
  232. //"Volunteer responding - We are only able to help with map issues, this should be reported to the local municipality. Please feel welcome to report any map issues you encounter. Thanks!",//rickzabel Pesach 12/22/14
  233. "Volunteer responding - We are only able to help with map issues. This should be reported to the local municipality. Please feel welcome to report any map issues you encounter. Thanks!", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  234. "NotIdentified",
  235.  
  236. "No user transponder (avoid tolls)",
  237. //"Volunteer responding - Waze is about getting you to your destination the fastest; however, it does not know if you have a toll transponder. Therefore, if you prefer to not have toll routes suggested, there is a feature under Settings > Navigation to avoid toll roads. Thanks!", //rickzabel Pesach 12/22/14
  238. //"Volunteer responding - Waze is about getting you to your destination via the fastest route. However, it does not know if you have a toll transponder. Therefore, if you prefer to not have toll routes suggested, there is a feature under Settings > Navigation to avoid toll roads. Thanks!", //rz 2/26/15 //karlcr9911 4/4/15
  239. //"Volunteer responding - Waze is about getting you to your destination via the fastest route. However, it does not know if you have a toll transponder. To avoid tolls, there is an option under Settings > Navigation or after clicking GO tap Routes and select one without gold coins (iphone) or toll (android). Thanks!", //a version of this was suggested by subs5 4/12/2015 //rickzabel 4/17/2015
  240. "Volunteer responding - While Waze attempts to route you to your destination efficiently, it does not know if you have a toll transponder. To avoid tolls, there is an option under Settings > Navigation or after clicking GO tap Routes and select one without gold coins (iphone) or toll (android). Thanks!", //rickzabel 4/17/2015
  241. "NotIdentified",
  242.  
  243. "No user transponder",
  244. //"Volunteer responding - Waze is about getting to your destination the fastest; however, it does not know if you have a toll transponder. As you travel, please feel welcome to report any map issues you encounter. Thanks!",//rickzabel Pesach 12/22/14
  245. //"Volunteer responding - Waze is about getting to your destination via the fastest route. However, it does not know if you have a toll transponder. As you travel, please feel welcome to report any map issues you encounter. Thanks!", //rickzabel 2/26/15 //t0cableguy 4/5/2015
  246. "Volunteer responding - While Waze attempts to route you to your destination efficiently, it does not know if you have a toll transponder. We are very sorry to say that the volunteer map editors cannot be much help here. As you travel, please feel welcome to report any map issues you encounter. Thanks!", //rickzabel karlcr9911 4/18/2015
  247. "NotIdentified",
  248.  
  249. "Not Using HOV",
  250. //"The map is setup correctly to support the HOV lane here. However the Waze Client App doesn't yet have the ability to know if you are in an HOV vehicle, it therefore assumes you do not meet the HOV criteria, and will only route you on roads open to all private vehicles.\nIf you are a qualified HOV vehicle and want to use the HOV lane, driving into the HOV should force Waze to recalculate your route. Once Waze realizes you are in the HOV lane, it should calculate the best route to your destination allowing you to stay in the HOV lane. If you have other questions or issues, please reply here, or send a new report at the location of the issue.\nThank you, and Happy Wazing", //peash 12/14/14
  251. "Waze does not have the ability to know you meet the HOV criteria. Driving into the HOV lane should force Waze to recalculate your route. Afterwards you should be allowed to stay in the HOV lane. Thanks!", //rickzabel 12/14/14
  252. "NotIdentified",
  253.  
  254. "U-turns",
  255. //"Volunteer responding - Currently Waze will not tell you to make a \"U-turn\". It will route you in several left/right turns to effectively create a U-turn. This is a programming issue that cannot be changed by the volunteer map editors, but we understand that Waze is working on a fix. Thanks!",//rickzabel Pesach 12/22/14
  256. "Volunteer responding - Currently Waze will not tell you to make a \"U-turn\". It will route you in several left/right turns to effectively create a U-turn. This is a programming issue that cannot be changed by the volunteer map editors. We understand that Waze is working on a fix. Thanks!", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  257. "NotIdentified",
  258.  
  259. "Traffic - Stale Information",
  260. //"Volunteer map editors can't do anything about Waze's traffic reporting. Waze relies on data from people using Waze to assess traffic. In the case of a fresh accident or slowdown, Waze may not yet have any data on the situation. Once Waze has detected a traffic situation, it can remember it for awhile, sometimes long after the situation changes.",
  261. //"Waze relies on data from people using Waze to assess traffic. The volunteer map editors cannot edit conditions reported through the Waze app. In the case of a recent accident or slowdown, Waze may not have any data for this situation. Once Waze has detected a traffic situation it might remember it for a period of time after the situation cleared up.", // reworded - rickzabel 12/7/2014, karlcr9911 12/8/14
  262. //”Waze relies on data from users like you to assess traffic. Map editors cannot cannot remove traffic jams reported through the Waze app. Once Waze has detected a traffic jam it will remain active until enough users vote it off the map or users travel through the intersection at normal speed. You can help clear traffic jam reports by tapping “not there” in the app when the pins appear. Thanks!” //t0cableguy 07/12/2015
  263. "Map editors are unable to remove traffic jams. You can help clear traffic reports by tapping \"not there\" when prompted or by traveling through the intersection at normal speed.", // rickzabel 7/22/2015 //t0cableguy 7/22/2015
  264. "NotIdentified",
  265.  
  266. "Traffic - Jams",
  267. //"To report traffic jam conditions, please use the Report -> Traffic Jam options in the Waze app. This will tell Waze about the problem in real-time. Traffic Jam reports can help route you and other Wazers around traffic problems.",
  268. "To report a traffic jams please use the Waze app by clicking the pin in the lower right and then clicking Traffic Jam. Traffic Jam reports can help route you and other Wazers around traffic problems in real-time. Thanks!", // reworded - rickzabel 12/7/2014, karlcr9911 12/8/14
  269. "NotIdentified",
  270.  
  271. "Signal Avoidance Bug",
  272. //"I do not see any issues with the current turn restrictions in the area. This appears to be part of the known signal avoidance bug. Waze's developers are working on a fix for the issue but currently we do not have an ETA. Please feel free to take the turn until the issue is resolved. Thanks!", // remove - rickzabel 12/7/2014 // added - rickzabel 12/7/2014
  273. //"There are no issues with the intersection’s turn restrictions. Waze's developers are working on a fix for this issue but we do not have an ETA. Please feel free use the signaled turn until the issue is resolved. Thanks!", // t0cableguy 12/7/14
  274. //"There are no issues with the intersection’s turn restrictions. Waze's developers are working on a fix for this issue but we do not have an ETA. Please feel free to use the turn until the issue is resolved. Thanks!", // rickzabel 12/9/14
  275. "There are no issues with the intersection’s turn restrictions. Waze's developers are working on a fix for this issue. We do not have an ETA. Please feel free to use the turn until the issue is resolved. Thanks!", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  276. "NotIdentified",
  277.  
  278. "Already included restrictions",
  279. "This restriction is already included in the map, Waze should not route through this illegal turn. If Waze ever gives you a route through a restricted turn, please send another Map Issue report at that time. Thanks!",
  280. "NotIdentified", //rickzabel Pesach 12/27/14
  281.  
  282. "1000 mile limit",
  283. //"The search and navigation capabilities of Waze are limited to 1000 miles. When driving further than that distance you will need to select a target under that distance as your temporary destination.",//rz 2/26/15
  284. "The search and navigation capabilities of Waze are limited to 1000 miles. When driving further than that distance you will need to select a destination less than 1000 miles as your temporary destination.", //karlcr9911 4/5/15 //rickzabel 4/5/15
  285. "NotIdentified",
  286.  
  287. "Temporary road blockage",
  288. //"Volunteer responding - if the road is completely blocked use the Report > Closure feature for you and others to be rerouted around it, otherwise please use Report > Traffic. At a minimum Waze is learning that that route is slower, and a faster route will become preferred.", //rickzabel Pesach 12/22/14
  289. "Volunteer responding - If the road is completely blocked, use the Report > Closure feature for you and others to be rerouted around it. Otherwise please use Report > Traffic. At a minimum Waze is learning that that route is slower, and a faster route will become preferred.", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  290. "NotIdentified",
  291.  
  292. "Temporary Road Closure",
  293. "Volunteer responding - For closures that last only a few days, the volunteer map editors cannot be much help. It takes at least that long for our edits to make it to the live map! When you encounter road closures in the future, please use the Report > Closure feature built into the Waze app. Thanks!",
  294. "NotIdentified",
  295.  
  296. "Temporary Road Closure",
  297. //"How long is the road going to be closed? For closures of only a few days, we volunteer map editors can't be much help. It takes at least that long for our edits to make it to devices! When you encounter short-term road closures in the future, please use the Report->Closure feature in the Waze app. If this is a long-term closure please respond and let us know as much as you can. Thanks!",
  298. "Do you know how long the road is going to be closed? For closures that last only a few days, the volunteer map editors cannot be much help. It takes at least that long for our edits to make it to the live map! When you encounter short-term road closures in the future, please use the Report > Closure feature built into the Waze app. If this is a long-term closure please respond and let us know as much as you can. Thanks!", // reworded - rickzabel 12/7/2014, karlcr9911 12/8/14
  299. "Open",
  300.  
  301. "Closure clean-up",
  302. "Due to daily changing closures we are closing out the old requests to concentrate on the newest ones. For closures that last only a few days, the volunteer map editors cannot be much help. It takes at least that long for our edits to make it to the live map! When you encounter short-term road closures in the future, please use the Report > Closure feature built into the Waze app. Thanks!", //rickzabel 12/28/14
  303. "NotIdentified",
  304.  
  305. "Thanks for the reply",
  306. "Thank you for the reply! This request will be closed. As you travel, please feel welcome to report any map issues you encounter.",
  307. "NotIdentified", //rickzabel 12/27/14
  308.  
  309. "No further communication",
  310. //"No further communication was received. This request will now be closed. As you travel, please feel welcome to report any map issues you encounter. Thanks!", //rickzabel 12/7/14, karlcr9911 12/7/14 t0cableguy 12/8/14 // one sentence? rickzabel 12/7/14
  311. //"No further communication was received. This request will now be closed. As you travel, please feel welcome to report any map issues you encounter. Thanks!",
  312. "No further information was received and the request is being closed. As you travel, please feel welcome to report any map issues you encounter. Thanks!", //t0cableguy 12/8/14 //rickzabel 12/8/14 , karlcr9911 12/8/14
  313. "NotIdentified", // same comment different action based off UR status rickzabel 12/7/14, karlcr9911 12/7/14 // one sentence? rickzabel 12/7/14 t0cableguy 12/8/14
  314.  
  315. "water non-editable",
  316. "This particular water feature is not editable by the volunteer editors, feel free to report this to support at https://support.google.com/waze/",
  317. "NotIdentified",
  318.  
  319. "Clear TTS Cache",
  320. //"If you continue to have this problem you will need to clear your Text-to-Speech cache. Go to the navigation screen and type cc@tts in search field and hit search. You should get a pop up message that the TTS file has been cleared. It will take a few days for the file to build back up with all the spoken street names.",
  321. //"Please clear your Text-to-Speech cache. In the navigate search box type cc@tts in the search field and press search. A message that the TTS file has been cleared should appear. It will take a few days for the file to download the spoken street names. Thanks!", //t0cableguy 12/8/2014, karlcr9911 12/8/14
  322. //"Please clear your Text-to-Speech cache. In the navigate search box type cc@tts in the search field and press search. You will get a message that the TTS file has been cleared. It will take a few days for the the spoken street names to be downloaded. Thanks!", //rickzabel 12/9/14
  323. "Please clear your Text-to-Speech cache. In the navigate search box type cc@tts in the search field and press search. You will get a message that the TTS file has been cleared. Your TTS cache we be re-populated as you use routing.. Thanks!", //GizmoGuy411 t0cableguy rickzabel 2015-04-04
  324. "NotIdentified", //t0cableguy This should be a last chance option for fixing the issue.04-04-2015 //rickzabel 04-04-2015
  325.  
  326. "Camera report",
  327. //"Thanks for the report. To ensure proper placement, Cameras must be reported in the app. REPORT > CAMERA (may have to scroll down for it) > SPEED/Red LIGHT > Submit”, //subs5 4/17/2015
  328. //"Thanks for the report. To ensure proper placement, Cameras must be reported in the app. REPORT > (scroll to) CAMERA > SPEED / Red LIGHT / Fake > Send”, //GizmoGuy411 2015-04-17
  329. "Volunteer responding, cameras must be reported from the app at / near the actual location using the Report > Camera option. Thank you!", //karlcr9911 rickzabel 4/17/2015
  330. "NotIdentified",
  331.  
  332. "<br>",
  333. "",
  334. "",
  335.  
  336. "Problem appears corrected",
  337. "Just a reminder: The problem appears to be corrected. Please let us know if you are continuing to have the issue. If we do not hear from you in a few days we will close this report. Thanks!",
  338. "Open", //karlcr9911 12/7/14 t0cableguy 12/8/14 //rickzabel 12/8/14
  339.  
  340. "Clears comment & sets UR status to Open",
  341. "",
  342. "Open",
  343.  
  344. "Include Users Description",
  345. "Volunteer responding - You reported \"$URD\" and Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!",
  346. "Open",
  347.  
  348. //selected segments requires the use of https://greasyfork.org/en/scripts/9232-wme-panel-swap
  349. "Include selected segments names",
  350. "Volunteer responding - You reported a problem near $SELSEGS, Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!",
  351. "Open",
  352.  
  353. "Wrong Street Name",
  354. "Volunteer responding - Waze did not send us enough information to fix your request. Would you please let us know which street name you think is wrong and what it should be? Thanks",
  355. "Open", //rickzabel Pesach 12/22/14
  356.  
  357.  
  358. "<br>",
  359. "",
  360. "",
  361.  
  362. //Default URs 6 through 22 are all the different types of UR that a user can submit do not change them thanks
  363. "Incorrect turn", //6
  364. //"Would you please let us know what turn you are having a problem with? Thanks!",
  365. //"Volunteer responding to your report: Would you please let us know what turn you are having a problem with? Would you tell us your destination as you entered it into Waze? Thanks!",//rickzabel 12/7/14, karlcr9911 12/8/14
  366. "Volunteer responding - Would you please let us know what turn you are having a problem with? Would you tell us your destination as you entered it into Waze? Thanks!", //rickzabel 12/9/14
  367. "Open",
  368.  
  369. "Incorrect address", //7
  370. //"Waze did not send us enough information to fix your request. In order for us to help you we need to know a couple of things; What is the address as you entered it into Waze and what was the problem you were having with this address?",
  371. //"Volunteer responding to your report: Waze did not send us enough information to fix your request. Would you tell us your destination as you entered it into Waze? What is the problem you are having with this address? Thanks!", //rickzabel 12/8/14, karlcr9911 12/8/14
  372. "Volunteer responding - Waze did not send us enough information to fix your request. Would you tell us your destination as you entered it into Waze? What is the problem you are having with this address? Thanks!", //rickzabel 12/8/14
  373. "Open",
  374.  
  375. "Incorrect route", //8
  376. //"Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!",
  377. //"Volunteer responding to your report: Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!", // karlcr9911 12/8/14
  378. "Volunteer responding - Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!", //rickzabel 12/9/14
  379. "Open",
  380.  
  381. "Missing roundabout", //9
  382. "Volunteer responding - Would you tell us as much as possible about the roundabout you believe is missing? Thanks!",
  383. "Open",
  384.  
  385. "General error", //10
  386. //"Waze did not send us enough information to fix your request. Would you please let us know what went wrong? Would you tell us your destination as you entered it into Waze? Thanks!",
  387. "Volunteer responding - Waze did not send us enough information to fix your request. Would you please let us know what went wrong? Would you tell us your destination as you entered it into Waze? Thanks!", //rickzabel 12/9/14
  388. "Open",
  389.  
  390. "Turn not allowed", //11
  391. //"Would you please let us know what turn was not, or should not be, allowed and the street names at the intersection? Thanks!",
  392. //"Volunteer responding - Would you please let us know what turn was not, or should not be, allowed and the street names at the intersection? Thanks!", //rickzabel 12/9/14
  393. "Volunteer responding - Would you please let us know which turn was or should not be allowed and why? Please specify the street names at the intersection. Thanks!", //rickzabel 2/26/15
  394. "Open",
  395.  
  396. "Incorrect junction", //12
  397. //"Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!",
  398. "Volunteer responding - Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!", //rickzabel 12/9/14
  399. "Open",
  400.  
  401. "Missing bridge overpass", //13
  402. //"Would you please let us know what overpass you believe is missing? When moving at highway speeds, Waze deliberately chooses not to display some nearby features to avoid cluttering the screen. Would you tell us as much as possible about the missing overpass. Thanks!",
  403. "Volunteer responding - Would you please let us know what overpass you believe is missing? When moving at highway speeds, Waze deliberately chooses not to display some nearby features to avoid cluttering the screen. Would you tell us as much as possible about the missing overpass. Thanks!", //rickzabel 12/9/14
  404. "Open",
  405.  
  406. "Wrong driving direction", //14
  407. //"Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!",
  408. "Volunteer responding - Waze did not send us enough information to fix your request. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!", //rickzabel 12/9/14
  409. "Open",
  410.  
  411.  
  412. "Missing Exit", //15
  413. //"Waze did not send us enough information to fix your request. Would you please let us know as much as possible about the missing exit? Thanks!",
  414. "Volunteer responding - Waze did not send us enough information to fix your request. Would you please let us know as much as possible about the missing exit? Thanks!", //rickzabel 12/9/14
  415. "Open",
  416.  
  417. "Missing Road", //16
  418. //"Would you tell us as much as possible about the road you believe is missing? Thanks!",
  419. "Volunteer responding - Would you tell us as much as possible about the road you believe is missing? Thanks!", //rickzabel 12/9/14
  420. "Open",
  421.  
  422.  
  423. "Missing Landmark", //18
  424. "Volunteer responding - Would you tell us as much as possible about the landmark you believe is missing? Thanks!",
  425. "Open",
  426.  
  427. /*
  428. "Blocked Road", //19
  429. "Volunteer responding -",
  430. "Open",
  431.  
  432. "Missing Street Name", //21
  433. "Volunteer responding -",
  434. "Open",
  435.  
  436. "Incorrect Street Prefix or Suffix", ///22
  437. "Volunteer responding -",
  438. "Open",
  439.  
  440.  
  441. */
  442.  
  443. "<br>",
  444. "",
  445. "",
  446. //End of Default URs
  447.  
  448. "User Followed Waze's route",
  449. //"It appears that you ended up going the route Waze suggested, what was the problem you were having? Would you tell us your destination as you entered it into Waze? Thanks!",
  450. //"It appears that you followed the Waze-suggested route. What problem did you encounter here? Would you tell us your destination as you entered it into Waze? Thanks!", //karlcr9911 12/7/2014
  451. "Volunteer responding - It appears that you followed the route Waze suggested. Would you please let us know what went wrong with the route Waze gave you? Would you tell us your destination as you entered it into Waze? Thanks!", //reworded rickzabel 12/7/2014
  452. "Open",
  453.  
  454. "Alley Interference",
  455. //"Waze doesn't tell volunteer editors where you were going, although it was probably adjacent to the alley. If you would, please supply your destination as you entered it into Waze it may be helpful in correcting the route. Thanks!",
  456. //"Waze does not let the volunteer editors know where you were going, although it was probably adjacent to the alley. If you would, please supply your destination as you entered it into Waze, it may be helpful in correcting the route. Thanks!", //rickzabel 12/7/14
  457. "Volunteer responding - Waze does not let the us know where you were going, although it was probably adjacent to the alley. Would you tell us your destination as you entered it into Waze? Thanks!", //rickzabel 12/9/14
  458. "Open",
  459.  
  460. "Road Closed",
  461. //"Would you please let us know the following; What road is closed?; between which intersections is this road closed; Do you know how long this road is scheduled to be closed? Thanks!", //karlcr9911
  462. "Volunteer responding - Would you please let us know the following; What road is closed?; between which intersections is this road closed; Do you know how long this road is scheduled to be closed? Thanks!", //rickzabel 12/9/14
  463. "Open",
  464.  
  465. "Area Entrances",
  466. "We have had problems with Google pins being placed in the center of large landmarks. Delete your previous search and do a new search for the location. Go to the bottom of the auto fill list to see more results and make sure you pick the Waze search engine.",
  467. "Open",
  468.  
  469. "48 Hour Reply",
  470. //"Please allow 48 hours for changes to be reflected in the live map.",
  471. "We made some changes to the map, please allow up to 48 hours for the changes to be reflected on the live map.", //rickzabel 12/7/14 //t0cableguy 12/8/14, karlcr9911 12/8/14
  472. "Open",
  473.  
  474. "Clear Saved Locations",
  475. //"You should remove the location from your favorites and recent searches and then re-search for the location to update the result.",
  476. //"To get an updated result you should remove the location from your favorites and recent searches and then re-search for the location.", //rickzabel 12/7/14
  477. "To get an updated result, remove the location from your navigation history and then search for the location again.", //t0cableguy 12/8/14, karlcr9911 12/8/14
  478. "Open",
  479.  
  480. "Address - Incorrect Position",
  481. //"Thank you for your report. Would you please let us know what address you’re reporting the problem with? You can also use the Report -> Places feature in Waze to mark the location. It is helpful that after taking a picture, if you move near the location your are marking to save the place. Also, please do not submit pictures containing faces, license plates, or similar personal details. Thanks!", //i also prefer not to send messages with contractions "you’re" rickzabel 12/7/14
  482. //"What was the Address you had issues with? Please show us where the address you had issues is with the Report > Places feature in Waze. After taking a picture move as close to the entrance of the place you are adding before saving. Please do not submit images with personal details. Thanks!", //t0cableguy 12/7/14, karlcr9911 12/8/14
  483. //"What was the Address you had issues with? Please show us where the address you had issues is with the Report > Places feature in Waze. After taking a picture, move close to the entrance of the place you are adding, before saving. Please do not submit pictures containing faces, license plates, or personal details. Thanks!", //rickzabel 2/26/15
  484. "Can you tell us the address or if you can revisit visit the location, please show us the correct position by using the Report > Places feature. Before you save move as close as possible to the entrance. Please do not submit pictures containing faces, license plates, or personal details. Thanks!", //rickzabel t0cableguy 04-04-2015
  485. "Open",
  486.  
  487. "Address - Missing from Map",
  488. //"Thank you for your report. Would you please let us know where the address you're reporting is? The live map doesn't have all the street numbers for that street and Waze is interpolating in error. You can also use the Report -> Places feature in Waze to mark the location. It is helpful that after taking a picture, if you move near the location you’re marking to save the place. Also, please do not submit pictures containing faces, license plates, or similar personal details. Thanks!", //rickzabel 12/7/14
  489. //"Volunteer responding - Would you let us know the address that is missing? The live map does not have all the street numbers. You can also use the Report Places feature in Waze to mark the location. It is helpful that after taking a picture that you move near the location you’re marking to save the place. Also, please do not submit pictures containing faces, license plates, or personal details. Thanks!", //rickzabel 12/9/14
  490. //"Volunteer responding - Would you let us know the address that is missing? The live map does not have all the street numbers. You can also use the Report Places feature in Waze to mark the location. It is helpful that after taking a picture that you move near the location you’re marking to save the place. Please do not submit pictures containing faces, license plates, or personal details. Thanks!", //rickzabel 2/26/15
  491. "Volunteer responding - Would you let us know the address that is missing? The available resources do not have the address available for your location. You can use the Report > Places feature in Waze to mark the location. Before you save move close as possible to the entrance. Do not submit pictures containing faces, license plates, or personal details. Thanks!", //rickzabel 4/5/2015 //t0cableguy 4/5/2015
  492. "Open",
  493.  
  494. "Address - Bad Results",
  495. //"Thank you for your report. The search feature retrieves results from a number of locations, including Google. Scrolling to the bottom the Navigate screen, you'll see more results for 'name.' Select that and Waze will list locations Around You. From there, you can also select results from other search engines.",
  496. //"Search results in Waze are retrieved from numerous sources. After tapping search, Scroll to the bottom and you will see options for other search engines . Please try a different option as each one may provide better navigation", //t0cableguy 12/7/14, karlcr9911 12/8/14
  497. "Search results in Waze are retrieved from numerous sources. After tapping search, Scroll to the bottom and you will see options for other search engines. Please try a different option as another search engine might have the address you are looking for", //rickzabel 12/9/14
  498. "Open",
  499.  
  500. "House Number Adjustment",
  501. //"I've forced Waze to re-register the house number for your destination. I believe this should correct your issue. Please allow 48 hours for changes to be reflected in the live map. If the location is in your saved searches or favorites, please remove them and search for them again to pick up the change in the live map. Please let me know if you continue to experience the problem. Thanks!",
  502. "I've forced Waze to re-register the house number for your destination. I believe this should correct your issue. Please allow up to 48 hours for changes to be reflected in the live map. If you have the location in your saved searches or favorites, please remove them and re-add the destination. Please let me know if you continue to experience this problem by submitting another error report. Thanks!", //rickzabel 12/7/14 //karlcr9911 12/8/14
  503. "Open",
  504.  
  505. "Missing Bridges or Roads",
  506. //"The roads here have been pretty thoroughly mapped and we volunteers can't see anything missing that should ordinarily be there. Waze probably simply chose not to show you the feature in question. When moving at highway speeds, Waze deliberately chooses not to display some nearby features to avoid cluttering the screen. If you are certain a feature is missing from the map, please reply and tell us as much as possible about it. Thanks!",
  507. //"The roads for this area are thoroughly mapped and the volunteer editors can not find anything missing from the map. When you are moving, Waze deliberately chooses not to display some nearby features to avoid cluttering the screen. If you are certain a feature is missing from the map, please reply and tell us as much as possible about it. Thanks!", //reworded rickzabel 12/7/14 //karlcr9911 12/8/14
  508. "The roads for this area are thoroughly mapped and the volunteer editors cannot find anything missing from the map. When you are moving, Waze deliberately chooses not to display some nearby features to avoid cluttering the screen. If you are certain a feature is missing from the map, please reply and tell us as much as possible about it. Thanks!", //rickzabel karlcr9911 4/18/2015
  509. "Open",
  510.  
  511. "Manual Refresh",
  512. //"You can try a manual refresh by going to Settings > Advanced > Data transfer > refresh maps.",
  513. //"Please try doing these options. Tap the Wazer icon > Settings > Advanced > Data transfer > Refresh Map Of My Area. Second you can try clearing Waze's app cache in your phone’s app manager. The final option is to Uninstall and Reinstall the app.", //t0cableguy 12/7/14
  514. //"Please try doing these options. Tap the Wazer icon > Settings > Advanced > Data transfer > Refresh Map Of My Area. Second, you can try clearing Waze's app cache in your phone’s app manager. The final option is to reset the app by going to the navigation screen and type ##@resetapp in search field and hit search.", // to Uninstall and Reinstall the app. (avoid user to use cellular data) //carloslaso 12/7/14 //rickzabel //t0cableguy
  515. "Please try doing these options. Tap the Wazer icon > Settings > Advanced > Data transfer > Refresh Map Of My Area. Secondly, you can try clearing Waze's app cache in your phone’s app manager. The final option is to reset the app by going to the navigation screen and type ##@resetapp in search field and hit search.", //GizmoGuy rickzabel 2/26/15
  516. "Open",
  517.  
  518. "Pave Road",
  519. //"Please use the pave function in the app to show us the path of the missing road. You can do this by tapping the bottom right Pin icon, then Map Issue, and selecting the Pave Road tab. Once you leave any mapped roads you can tap start paving. Please be sure to tap the steamroller and tap stop paving before driving back onto any roads that are mapped. If paving a parking lot, please only drive the main roads and perimeters, not each aisle and space. Thanks for your contribution to the map! Thanks!", //requested by t0cableguy
  520. //"Please use the pave function in the app to show us the path of the missing road. You can do this by tapping the bottom right Pin icon, then Map Issue, and selecting the Pave Road tab. Once you leave any mapped roads you can tapp paving. Please be sure to tap the steamroller and tap stop paving before driving back onto any roads that are mapped. If paving a parking lot please only drive the main roads and perimeters, not each aisle and space. Thanks for your contribution to the map! Thanks!",//rickzabel
  521. //"Please pave the road in the app. Tap the Pin icon > Map Issue > Pave Road tab. After leaving any mapped roads tap start paving. Once done tap the steamroller > stop paving. Thanks for your contribution to the map!", //shortened and voted for by t0cableguy 12/7/14, karlcr9911 12/8/14
  522. //"Please pave the road in the app. Tap the Pin icon > Map Issue > Pave Road tab. After leaving any mapped roads tap start paving. Once done tap the steamroller > stop paving. If you then tap the Pin icon (Report) > Map Issue > Missing Road, you can enter text providing information about the new road (name, is it a private road, etc.). Thanks for your contribution to the map!",//addition suggested by SuperDave1426 12/08/14
  523. //We already have open communication if we are telling them to pave a road. It would be helpful to drop ur pins but we have open communication and the users know how to submit reports. We shouldn’t close the UR that is already open, so we don’t need another UR. t0cableguy 12/8/14 I’m leaning more torward adding this though SD as a teaching tool. t0cableguy 12/8/14
  524. //"Volunteer responding - You can pave the road from the app by tapping the Pin icon > Map Issue > Pave Road tab. After leaving the paved road tap start paving. Once done tap the steamroller > stop paving. You can provide information about the new road such as it's name buy tapping on the Pin icon > Map Issue > Missing Road, and Thanks!", //rickzabel 12/8/14 t0cableguy 12/8/14
  525. //"Volunteer responding - You can pave the road from the app by tapping the Pin icon > Map Issue > Pave Road tab. After leaving the paved road tap start paving. Once done tap the steamroller > stop paving. You can provide information about the new road such as it's name by tapping on the Pin icon > Map Issue > Missing Road, and Thanks!", //rickzabel 2/26/15
  526. "Volunteer responding - You can pave the road from the app by tapping the Pin icon > Map Issue > Pave Road tab. After leaving the paved road, tap Start paving. Once done, tap the Steamroller > Stop paving. You can provide information about the new road such as its name by tapping on the Pin icon > Map Issue > Missing Road. Thanks!", //karlcr9911 4/5/15 //rickzabel 4/5/15 removed single quotes
  527. "Open",
  528.  
  529. //"Blank Screen.",
  530. //"Please follow these instructions in the app. Tap the Wazer icon > Settings > Advanced > Data transfer > Refresh map of my area. Second you can try clearing Waze's app cache in your phone’s app manager. The final option is to Uninstall and Reinstall the app.",
  531. //"Open", //requested by t0cableguy 12/7/14 in map refresh now t0cableguy 12/8/14
  532.  
  533. "Unlock request",
  534. //"I have requested the rights to get this issue fixed. Thanks for your report. Thanks! ", //requested by t0cableguy 12/8/14
  535. //"Volunteer responding to your report: I have requested the rights to get this issue fixed. Thanks for your report.", //rikzabel 12/8/14 i usually dont say anything cause this is weird that they made a request for you to make a request…
  536. //"I have begun the process to get this issue fixed. Thanks for your report. Thanks! ",//reword t0cableguy 12/8/14
  537. //"I have begun the process to get this issue fixed. Thanks for your report!", //rickzabel 12/11/14
  538. "I have started the process to get this issue fixed. Thanks for your report!", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  539. "Open"
  540. ];
  541.  
  542. //auto insertion config:
  543. //the position in the list that the reminder message is at. (counting titles, comments, and ur status)
  544. ReminderPosistion = 21;
  545.  
  546. //the position of the close as Not Identified message that you have in the list (the first comment is the list is 0)
  547. CloseNotIdentifiedPosistion = 24;
  548.  
  549. //Waze's default URs number to name conversion array
  550. //Thanks to SuperMedic
  551.  
  552. def_names[6] = "Incorrect turn";
  553. def_names[7] = "Incorrect address";
  554. def_names[8] = "Incorrect route";
  555. def_names[9] = "Missing roundabout";
  556. def_names[10] = "General error";
  557. def_names[11] = "Turn not allowed";
  558. def_names[12] = "Incorrect junction";
  559. def_names[13] = "Missing bridge overpass";
  560. def_names[14] = "Wrong driving direction";
  561. def_names[15] = "Missing Exit";
  562. def_names[16] = "Missing Road";
  563. def_names[18] = "Missing Landmark";
  564. def_names[19] = "Blocked Road";
  565. def_names[21] = "Missing Street Name";
  566. def_names[22] = "Incorrect Street Prefix or Suffix";
  567.  
  568. //zoom out links
  569. URC_Text[0] = "Zoom Out 0 & Close UR";
  570. URC_Text_tooltip[0] = "Zooms all the way out and closes the UR window";
  571.  
  572. URC_Text[1] = "Zoom Out 2 & Close UR";
  573. URC_Text_tooltip[1] = "Zooms out to level 2 and closes the UR window (this is where I found most of the toolbox highlighting works)";
  574.  
  575. URC_Text[2] = "Zoom Out 3 & Close UR";
  576. URC_Text_tooltip[2] = "Zooms out to level 3 and closes the UR window (this is where I found most of the toolbox highlighting works)";
  577.  
  578. URC_Text_tooltip[3] = "Reload the map";
  579.  
  580. URC_Text_tooltip[4] = "Number of URs Shown on screen";
  581.  
  582. //tab names
  583. URC_Text[5] = "Comments";
  584. URC_Text[6] = "UR Filtering";
  585. URC_Text[7] = "Settings";
  586.  
  587. //UR Filtering Tab
  588. URC_Text[8] = "Click here for Instructions";
  589.  
  590. URC_Text[9] = "Enable URComments UR filtering";
  591. URC_Text_tooltip[9] = "Enable or disable URComments filtering";
  592.  
  593. URC_Text[10] = "Enable UR pill counts";
  594. URC_Text_tooltip[10] = "Enable or disable the pill with UR counts";
  595.  
  596. URC_Text[12] = "Hide Waiting";
  597. URC_Text_tooltip[12] = "Only show URs that need work (hide in-between states)";
  598.  
  599. URC_Text[13] = "Only show my URs";
  600. //URC_Text_tooltip[13] = "Hide UR where there are zero comments from the logged in editor";
  601. URC_Text_tooltip[13] = "Hide URs where you have no comments";
  602.  
  603. URC_Text[14] = "Show others URs past reminder + close";
  604. URC_Text_tooltip[14] = "Show URs that other commented on that have gone past the reminder and close day settings added together";
  605.  
  606. URC_Text[15] = "Hide URs Reminder needed";
  607. URC_Text_tooltip[15] = "Hide URs where reminders are needed";
  608.  
  609. URC_Text[16] = "Hide URs user replies";
  610. URC_Text_tooltip[16] = "Hide UR with user replies";
  611.  
  612. URC_Text[17] = "Hide URs close needed";
  613. URC_Text_tooltip[17] = "Hide URs that need closing";
  614.  
  615. URC_Text[18] = "Hide URs no comments";
  616. URC_Text_tooltip[18] = "Hide URs that have zero comments";
  617.  
  618. URC_Text[19] = "hide 0 comments without descriptions";
  619. URC_Text_tooltip[19] = "Hide URs that do not have descriptions or comments";
  620.  
  621. URC_Text[20] = "hide 0 comments with descriptions";
  622. URC_Text_tooltip[20] = "Hide URs that have descriptions and zero comments";
  623.  
  624. URC_Text[21] = "Hide Closed URs";
  625. URC_Text_tooltip[21] = "Hide closed URs";
  626.  
  627. URC_Text[22] = "Hide Tagged URs";
  628. URC_Text_tooltip[22] = "Hide URs that are tagged with URO+ style tags ex. [NOTE]";
  629.  
  630. URC_Text[23] = "Reminder days: ";
  631. //URC_Text_tooltip[23] = "";
  632.  
  633. URC_Text[24] = "Close days: ";
  634. //URC_Text_tooltip[] = "";
  635.  
  636. //settings tab
  637. URC_Text[25] = "Auto set new UR comment";
  638. URC_Text_tooltip[25] = "Auto set the UR comment on new URs that do not already have comments";
  639.  
  640. URC_Text[26] = "Auto set reminder UR comment";
  641. URC_Text_tooltip[26] = "Auto set the UR reminder comment for URs that are older than reminder days setting and have only one comment";
  642.  
  643. URC_Text[27] = "Auto zoom in on new UR";
  644. URC_Text_tooltip[27] = "Auto zoom in when opening URs with no comments and when sending UR reminders";
  645.  
  646. URC_Text[28] = "Auto center on UR";
  647. URC_Text_tooltip[28] = "Auto Center the map at the current map zoom when UR has comments and the zoom is less than 3";
  648.  
  649. URC_Text[29] = "Auto click open, solved, not identified";
  650. URC_Text_tooltip[29] = "Suppress the message about recent pending questions to the reporter and then depending on the choice set for that comment Clicks Open, Solved, Not Identified";
  651.  
  652. URC_Text[30] = "Auto save after a solved or not identified comment";
  653. URC_Text_tooltip[30] = "If Auto Click Open, Solved, Not Identified is also checked, this option will click the save button after clicking on a UR-Comment and then the send button";
  654.  
  655. URC_Text[31] = "Auto close comment window";
  656. URC_Text_tooltip[31] = "For the user requests that do not require saving this will close the user request after clicking on a UR-Comment and then the send button";
  657.  
  658. URC_Text[32] = "Auto reload map after comment";
  659. URC_Text_tooltip[32] = "Reloads the map after clicking on a UR-Comment and then send button. This does not apply to any messages that needs to be saved, since saving automatically reloads the map. Currently this is not needed but I am leaving it in encase Waze makes changes";
  660.  
  661. URC_Text[33] = "Auto zoom out after comment";
  662. URC_Text_tooltip[33] = "After clicking on a UR-Comment in the list and clicking send on the UR the map zoom will be set back to your previous zoom";
  663.  
  664. URC_Text[34] = "Auto switch to the UrComments tab";
  665. URC_Text_tooltip[34] = "Auto switch to the URComments tab when opening a UR, when the UR window is closed you will be switched to your previous tab";
  666.  
  667. URC_Text[35] = "Close message - double click link (auto send)";
  668. URC_Text_tooltip[35] = "Add an extra link to the close comment when double clicked will auto send the comment to the UR windows and click send, and then will launch all of the other options that are enabled";
  669.  
  670. URC_Text[36] = "All comments - double click link (auto send)";
  671. URC_Text_tooltip[36] = "Add an extra link to each comment in the list that when double clicked will auto send the comment to the UR windows and click send, and then will launch all of the other options that are enabled";
  672.  
  673. URC_Text[37] = "Comment List";
  674. URC_Text_tooltip[37] = "This shows the selected comment list. There is support for a custom list. If you would like your comment list built into this script or have suggestions on the Comments team’s list, please contact me at rickzabel @waze or @gmail";
  675.  
  676. URC_Text[38] = "Disable done button";
  677. URC_Text_tooltip[38] = "Disable the done button at the bottom of the new UR window";
  678.  
  679. URC_Text[39] = "Unfollow UR after send";
  680. URC_Text_tooltip[39] = "Unfollow UR after sending comment";
  681.  
  682. URC_Text[40] = "Auto send reminders";
  683. URC_Text_tooltip[40] = "Auto send reminders to my UR as they are on screen";
  684.  
  685. URC_Text[41] = "Replace tag name with editor name";
  686. URC_Text_tooltip[41] = "When a UR has the logged in editors name in the description or any of the comments of the UR (not the name Waze automatically add when commenting) replace the tag type with the editors name";
  687.  
  688. URC_Text[42] = "(Double Click)"; //double click to close links
  689. URC_Text_tooltip[42] = "Double click here to auto send - ";
  690.  
  691.  
  692. URC_USER_PROMPT[0] = "URComments - You either have a older version of the custom comments file or a syntax error either will keep the custom list from loading. Missing: ";
  693.  
  694. URC_USER_PROMPT[1] = "URComments - You are missing the following items from your custom comment list: ";
  695.  
  696. URC_USER_PROMPT[2] = "List can not be found. You can find the list and instructions at https://wiki.waze.com/wiki/User:Rickzabel/UrComments/";
  697.  
  698. URC_USER_PROMPT[3] = "URComments you can not set close days to zero";
  699.  
  700. URC_USER_PROMPT[4] = "URComments - To use the double click links you must have the Auto click open, solved, not identified option enabled";
  701.  
  702. URC_USER_PROMPT[5] = "URComments - Aborting FilterURs2 because both filtering, counts, and auto reminders are disabled";
  703.  
  704. URC_USER_PROMPT[6] = "URComments: Loading UR data has timed out, retrying."; //this message is shown across the top of the map in a orange box, length must be kept short
  705.  
  706. URC_USER_PROMPT[7] = "URComments: Adding reminder message to UR: "; //this message is shown across the top of the map in a orange box, length must be kept short
  707.  
  708. URC_USER_PROMPT[8] = "URComment's UR Filtering has been disabled because URO+\'s UR filters are active."; //this message is shown across the top of the map in a orange box, length must be kept short
  709.  
  710. URC_USER_PROMPT[9] = "UrComments has detected that you have unsaved edits!\n\nWith the Auto Save option enabled and with unsaved edits you cannot send comments that would require the script to save. Please save your edits and then re-click the comment you wish to send.";
  711.  
  712. URC_USER_PROMPT[10] = "URComments: Can not find the comment box! In order for this script to work you need to have a UR open."; //this message is shown across the top of the map in a orange box, length must be kept short
  713.  
  714. URC_USER_PROMPT[11] = "URComments - This will send reminders at the reminder days setting. This only happens when they are visible on your screen. NOTE: when using this feature you should not leave any UR open unless you had a question that needed an answer from the wazer as this script will send those reminders."; //conformation message/ question
  715.  
  716. //end CommentTeam's list
  717.  
  718. //custom other languages lists from external list
  719. } else {
  720.  
  721. try {
  722.  
  723. var CustomListError = false;
  724. var CustomErrorListText = "";
  725. var CustomErrorListCount = 0;
  726. //custom list
  727. URCommentsArray = eval("window.Urcomments" + SelectedBoilerPlateCreator + "Array2");
  728.  
  729. //the position in the list that the reminder message is at. (starting at 0 counting titles, comments, and ur status)
  730. ReminderPosistion = eval("window.Urcomments" + SelectedBoilerPlateCreator + "ReminderPosistion");
  731.  
  732. //the position of the close as Not Identified message (starting at 0 counting titles, comments, and ur status)
  733. CloseNotIdentifiedPosistion = eval("window.Urcomments" + SelectedBoilerPlateCreator + "CloseNotIdentifiedPosistion");
  734.  
  735. //copy the waze default titles into the active ?
  736. //Waze's default URs number to name conversion array
  737. //Thanks to SuperMedic
  738.  
  739. def_names[6] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[6]"); //"Incorrect turn";
  740. def_names[7] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[7]"); //"Incorrect address";
  741. def_names[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[8]"); //"Incorrect route";
  742. def_names[9] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[9]"); //"Missing roundabout";
  743. def_names[10] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[10]"); //"General error";
  744. def_names[11] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[11]"); //"Turn not allowed";
  745. def_names[12] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[12]"); //"Incorrect junction";
  746. def_names[13] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[13]"); //"Missing bridge overpass";
  747. def_names[14] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[14]"); //"Wrong driving direction";
  748. def_names[15] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[15]"); //"Missing Exit";
  749. def_names[16] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[16]"); //"Missing Road";
  750. def_names[18] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[18]"); //"Missing Landmark";
  751. def_names[19] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[19]"); //"Blocked Road";
  752. def_names[21] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[21]"); //"Missing Street Name";
  753. def_names[22] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[22]"); //"Incorrect Street Prefix or Suffix";
  754.  
  755.  
  756. //try {
  757. URC_Text[0] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[0]");
  758. URC_Text_tooltip[0] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[0]");
  759.  
  760. URC_Text[1] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[1]");
  761. URC_Text_tooltip[1] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[1]");
  762.  
  763. URC_Text[2] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[2]");
  764. URC_Text_tooltip[2] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[2]");
  765.  
  766. URC_Text[3] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[3]");
  767. URC_Text_tooltip[3] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[3]");
  768.  
  769. URC_Text[4] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[4]");
  770. URC_Text_tooltip[4] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[4]");
  771.  
  772. URC_Text[5] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[5]");
  773. URC_Text_tooltip[5] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[5]");
  774.  
  775. URC_Text[6] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[6]");
  776. URC_Text_tooltip[6] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[6]");
  777.  
  778. URC_Text[7] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[7]");
  779. URC_Text_tooltip[7] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[7]");
  780.  
  781. URC_Text[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[8]");
  782. URC_Text_tooltip[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[8]");
  783.  
  784. URC_Text[9] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[9]");
  785. URC_Text_tooltip[9] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[9]");
  786.  
  787. URC_Text[10] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[10]");
  788. URC_Text_tooltip[10] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[10]");
  789.  
  790. URC_Text[11] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[11]");
  791. URC_Text_tooltip[11] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[11]");
  792.  
  793. URC_Text[12] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[12]");
  794. URC_Text_tooltip[12] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[12]");
  795.  
  796. URC_Text[13] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[13]");
  797. URC_Text_tooltip[13] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[13]");
  798.  
  799. URC_Text[14] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[14]");
  800. URC_Text_tooltip[14] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[14]");
  801.  
  802. URC_Text[15] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[15]");
  803. URC_Text_tooltip[15] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[15]");
  804.  
  805. URC_Text[16] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[16]");
  806. URC_Text_tooltip[16] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[16]");
  807.  
  808. URC_Text[17] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[17]");
  809. URC_Text_tooltip[17] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[17]");
  810.  
  811. URC_Text[18] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[18]");
  812. URC_Text_tooltip[18] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[18]");
  813.  
  814. URC_Text[19] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[19]");
  815. URC_Text_tooltip[19] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[19]");
  816.  
  817. URC_Text[20] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[20]");
  818. URC_Text_tooltip[20] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[20]");
  819.  
  820. URC_Text[21] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[21]");
  821. URC_Text_tooltip[21] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[21]");
  822.  
  823. URC_Text[22] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[22]");
  824. URC_Text_tooltip[22] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[22]");
  825.  
  826. URC_Text[23] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[23]");
  827. URC_Text_tooltip[23] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[23]");
  828.  
  829. URC_Text[24] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[24]");
  830. URC_Text_tooltip[24] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[24]");
  831.  
  832. URC_Text[25] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[25]");
  833. URC_Text_tooltip[25] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[25]");
  834.  
  835. URC_Text[26] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[26]");
  836. URC_Text_tooltip[26] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[26]");
  837.  
  838. URC_Text[27] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[27]");
  839. URC_Text_tooltip[27] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[27]");
  840.  
  841. URC_Text[28] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[28]");
  842. URC_Text_tooltip[28] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[28]");
  843.  
  844. URC_Text[29] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[29]");
  845. URC_Text_tooltip[29] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[29]");
  846.  
  847. URC_Text[30] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[30]");
  848. URC_Text_tooltip[30] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[30]");
  849.  
  850. URC_Text[31] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[31]");
  851. URC_Text_tooltip[31] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[31]");
  852.  
  853. URC_Text[32] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[32]");
  854. URC_Text_tooltip[32] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[32]");
  855.  
  856. URC_Text[33] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[33]");
  857. URC_Text_tooltip[33] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[33]");
  858.  
  859. URC_Text[34] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[34]");
  860. URC_Text_tooltip[34] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[34]");
  861.  
  862. URC_Text[35] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[35]");
  863. URC_Text_tooltip[35] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[35]");
  864.  
  865. URC_Text[36] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[36]");
  866. URC_Text_tooltip[36] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[36]");
  867.  
  868. URC_Text[37] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[37]");
  869. URC_Text_tooltip[37] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[37]");
  870.  
  871. URC_Text[38] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[38]");
  872. URC_Text_tooltip[38] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[38]");
  873.  
  874. URC_Text[39] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[39]");
  875. URC_Text_tooltip[39] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[39]");
  876.  
  877. URC_Text[40] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[40]");
  878. URC_Text_tooltip[40] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[40]");
  879.  
  880. URC_Text[41] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[41]");
  881. URC_Text_tooltip[41] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[41]");
  882.  
  883. URC_Text[42] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[42]");
  884. URC_Text_tooltip[42] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[42]");
  885.  
  886.  
  887. URC_USER_PROMPT[0] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[0]");
  888. URC_USER_PROMPT[1] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[1]");
  889. URC_USER_PROMPT[2] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[2]");
  890. URC_USER_PROMPT[3] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[3]");
  891. URC_USER_PROMPT[4] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[4]");
  892. URC_USER_PROMPT[5] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[5]");
  893. URC_USER_PROMPT[6] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[6]");
  894. URC_USER_PROMPT[7] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[7]");
  895. URC_USER_PROMPT[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[8]");
  896. URC_USER_PROMPT[9] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[9]");
  897. URC_USER_PROMPT[10] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[10]");
  898. URC_USER_PROMPT[11] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[11]");
  899.  
  900.  
  901. } catch (err) {
  902. alert("URC: All of the text in URC is now configurable within the custom comments file. Your comments file " + SelectedBoilerPlateCreator + " is outdated, has errors, or your language file is not installed please back up your comments. Then force update the comments file from greasyfork and paste your comments back into the custom comments file. Since there is an error the comments team's list will be chosen.");
  903. console.log("URC: comment list error " + err);
  904. localStorage.setItem('BoilerPlateCreators', 'CommentTeam');
  905. $("#sidepanel-Comments").html('');
  906. //reload the content
  907. ChangeLanguage = true;
  908. URComments_bootstrap();
  909. return false;
  910. }
  911. }
  912. URComments_init();
  913. }
  914. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  915. //////
  916. ////// init
  917. //////
  918. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  919.  
  920. function URComments_init() {
  921. //urcToConsole("Start init 1");
  922.  
  923. //create the URComments object
  924. var URComments = {};
  925.  
  926. URComments.init = function() {
  927. //if we are changing the language do not redraw the tab
  928. if (ChangeLanguage === false) {
  929.  
  930. //CSS
  931. //expand the UR textarea so we can verfiy what comment we clicked on. special thanks to SeekingSerenity
  932. var g = '.ur-comment-list .comment-list { bottom: 200px !important; } .ur-comment-list .new-comment-form textarea { height: 140px !important; } .ur-comment-list .new-comment-form { height: 200px !important; }';
  933.  
  934. var wazeheight = $(".view-area").height();
  935. if (wazeheight > 500) {
  936. //betaeditor commetn textarea
  937. g = g + '.new-comment-form .new-comment-text { height: 140px !important; }';
  938. }
  939.  
  940. //css for items in my tab that are in a label (uro presets)
  941. g = g + '#sidepanel-Comments label { cursor:pointer; margin:0px 0px 0px; vertical-align: middle;font-size: 10px;}';
  942.  
  943. //css for checkboxes
  944. g = g + '#sidepanel-Comments .URCommentsCheckbox { text-decoration:none; cursor:pointer; color: #000000; margin:0px 0px 0px; vertical-align: middle; font-size: 12px;}';
  945.  
  946. //css for our comments,
  947. g = g + '#sidepanel-Comments .URComments { text-decoration:none; cursor:pointer; color: #000000; font-size: 12px;}'; // margin-top: 5px;
  948.  
  949. //css for our uro presets,
  950. g = g + '#sidepanel-Comments .URCommentsPresets { text-decoration:none; cursor:pointer; color: #000000; font-size: 10px;}';
  951.  
  952. //css for our nav tabs,
  953. g = g + '#comments-tab22 ul { font-size: 12px; padding: 0px;}';
  954.  
  955. //css for our nav tabs links,
  956. g = g + '#comments-tab22 a { padding: 3px !important ; margin-right: 0px !important;}';
  957.  
  958. // keep the padding on our nav tabs
  959. g = g + '#comments-tab22 nav-tabs { padding: 0px !important;}';
  960.  
  961. //css for non selected UR opacity
  962. g = g + ".olMap.problem-selected .map-problem:not(.selected) { opacity: .5 !important;}";
  963.  
  964. //css to fix the beta editors UR window
  965. g = g + '.problem-edit .section .title { line-height: 15px !important; }';
  966.  
  967. g = g + '.problem-edit .header { line-height: 15px !important; padding: 0px 15px!important; }';
  968. g = g + '.problem-edit .section .content { padding: 5px !important;}';
  969.  
  970. /* old css
  971. g = g + '.problem-edit { max-height: 85% !important; }';
  972.  
  973. //g = g + '.problem-edit .body { position: absolute !important; top: 30px !important; bottom: 5px !important; overflow: auto !important;}';
  974.  
  975. //g = g + '.problem-edit .body { position: absolute !important; top: 30px !important; bottom: 5px !important; overflow: auto !important; width: 280px !important;}';
  976.  
  977. g = g + '#panel-container .panel { left: 0px !important; top: 60px !important; bottom: 25px !important; margin-bottom: 15px !important;}';
  978.  
  979. g = g + '.problem-edit .conversation.section .new-comment-form { padding: 10px 15px !important; }';
  980. //g = g + '.problem-edit .conversation.section .new-comment-form textarea { placeholder: "Remember, be nice!"; margin-bottom: 5px; }';
  981. g = g + '.problem-edit .actions .controls-container label[for|="state"] { margin-bottom: 5px; }';
  982. g = g + '.header .close-panel { padding-top: 5px; }';
  983. g = g + '.header .focus { padding-top: 5px; }';
  984. g = g + '.problem-edit .conversation.section .comment-list { padding-right: 0px; margin-right: 5px; padding-left: 0px; margin-left: 5px; overflow-y: hidden; max-height: 100%;}';
  985. */
  986.  
  987. //css to undo some of the changes from maximizer
  988. if ($("#sidebar").width() < 300) {
  989. g = g + '#sidebar { max-width: 290px !important;}';
  990. g = g + '.show-sidebar .row-fluid .fluid-fixed {margin-left: 290px !important;}';
  991. }
  992.  
  993. //move description up a div
  994. g = g + '.problem-edit .description { background-color: white; overflow-x: hidden; overflow-y: auto; max-height: 80px; border-bottom: 2px solid #e9e9e9;}';
  995.  
  996.  
  997. //append our css to the head
  998. $("head").append($('<style type="text/css">' + g + '</style>'));
  999.  
  1000. //urcToConsole("Start adding the URComments's tab");
  1001. //add comments tab
  1002. var b = $('<li><a href="#sidepanel-Comments" data-toggle="tab" id="CommentsTab">URC</a> </li> ');
  1003. //i had to switch to first() becuase someone was reusing the nav tabs in another script and this would cause my tab to go inside theirs!
  1004. //$("h2 + ul.nav-tabs").first().append(b);
  1005. $("#user-info ul.nav-tabs").first().append(b);//production 10/29/2015
  1006. $("#user-tabs ul.nav-tabs").first().append(b);//beta 10/29/2015
  1007.  
  1008.  
  1009. //add the content to the comments tab
  1010. //Comment tab header and zoom out button
  1011. var c = "";
  1012. c = c + '<div class="tab-pane" id="sidepanel-Comments" ><div class="URComments"></div></div>';
  1013. //$("h2 + ul.nav-tabs + .tab-content").append(c);
  1014. //$("ul.nav-tabs + .tab-content").append(c);
  1015. //$("#user-info > div.tab-content").append(c);
  1016. //$("div > div > div.tab-content").append(c);
  1017. $("#user-info div.tab-content").first().append(c);//production 10/29/2015
  1018. $("#user-tabs div.tab-content").first().append(c);//beta 10/29/2015
  1019.  
  1020. }
  1021. //reset the var to change the language
  1022. ChangeLanguage = false;
  1023.  
  1024.  
  1025. var c = "";
  1026. c = c + '<div style="position: absolute; left: 20px;"><img src="' + UrCommentsIcon + '" style="cursor:default;"></div>';
  1027. c = c + '<div style="position: absolute; left: 70px;"><b>UR Comments Stable ' + URCommentVersion + '</b>';
  1028. c = c + '<br>';
  1029. c = c + '<a id="URCommentZoomOutButton" class="URComments" Title="' + URC_Text_tooltip[0] + '">' + URC_Text[0] + '</a>';
  1030. c = c + '<br>';
  1031. c = c + '<a id="URCommentZoomOutButton2" class="URComments" Title="' + URC_Text_tooltip[1] + '">' + URC_Text[1] + '</a>';
  1032. c = c + '<br>';
  1033. c = c + '<a id="URCommentZoomOutButton3" class="URComments" Title="' + URC_Text_tooltip[2] + '">' + URC_Text[2] + '</a>';
  1034. c = c + '<div id="URCWazeReloadMap" title="' + URC_Text_tooltip[3] + '" data-original-title="" class="icon-repeat reload-button URComments" content="" style="font-size: 20px; position: absolute; left: 140px; top: 22px;"></div>';
  1035.  
  1036. //UR count
  1037. //c = c + '<div Title="Number of UR Shown" id="URCount" style="position: absolute; top: 110px; left: 30px; font-size: 8px; width: 55px;"></div>';
  1038. c = c + '<div Title="' + URC_Text_tooltip[4] + '" id="URCount" style="font-size: 12px; width: 75%; text-align:center;"></div>';
  1039.  
  1040. $("#sidepanel-Comments").append(c);
  1041.  
  1042. //add the map zoom out handlers
  1043. $("#URCommentZoomOutButton").click(URComments.SetZoomCloseUR(0, "CloseUR"));
  1044. //$("#URCommentZoomOutButton").click(URComments.SetZoomCloseUR(1, "CloseUR"));
  1045. $("#URCommentZoomOutButton2").click(URComments.SetZoomCloseUR(2, "CloseUR"));
  1046. $("#URCommentZoomOutButton3").click(URComments.SetZoomCloseUR(3, "CloseUR"));
  1047.  
  1048.  
  1049. //add the map reload handler
  1050. $("#URCWazeReloadMap").click(URComments.AutoReloadMapOnComment);
  1051.  
  1052. c = '<div id="comments-tab22" class="active" style="padding-top: 90px;">';
  1053. c = c + ' <ul class="nav nav-tabs">';
  1054. c = c + ' <li class="active"><a data-toggle="tab" href="#sidepanel-URComments-list">' + URC_Text[5] + '</a></li>';
  1055. c = c + ' <li><a data-toggle="tab" href="#sidepanel-URComments-URO-Presets">' + URC_Text[6] + '</a></li>';
  1056. c = c + ' <li><a data-toggle="tab" href="#sidepanel-URComments-settings">' + URC_Text[7] + '</a></li>';
  1057. c = c + ' </ul>';
  1058. c = c + ' <div class="tab-content">'; // style="padding: 10px 1px 1px 10px !important;"
  1059. c = c + ' <div class="tab-pane active" id="sidepanel-URComments-list">';
  1060. c = c + ' </div>';
  1061. c = c + ' <div class="tab-pane" id="sidepanel-URComments-URO-Presets">';
  1062. c = c + ' </div>';
  1063. c = c + ' <div class="tab-pane" id="sidepanel-URComments-settings">';
  1064. c = c + ' </div>';
  1065. c = c + ' </div>';
  1066. c = c + '</div>';
  1067.  
  1068. //add the sub tabs to the scripts main tab
  1069. $("#sidepanel-Comments").append(c);
  1070.  
  1071. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1072. //////
  1073. ////// Comments
  1074. //////
  1075. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1076.  
  1077. d = $('<a href="https://docs.google.com/presentation/d/1zwdKAejRbnkUll5YBfFNrlI2I3Owmb5XDIbRAf47TVU/edit#slide=id.p">' + URC_Text[8] + '<a/><br><br>');
  1078. $("#sidepanel-URComments-URO-Presets").append(d);
  1079.  
  1080. //enable or disable urc filtering URCommentsFilterEnabled
  1081. d = $('<label Title="' + URC_Text_tooltip[9] + '"><input type="checkbox" id="URCommentsFilterEnabled" class="URCommentsCheckbox"> ' + URC_Text[9] + '</input></label><br>');
  1082. //$("#sidepanel-URComments-list").append(d);
  1083. $("#sidepanel-URComments-URO-Presets").append(d);
  1084. $("#URCommentsFilterEnabled").click(function() {
  1085. $(localStorage.setItem('URCommentsFilterEnabled', URCommentsFilterEnabled.checked));
  1086.  
  1087. //if(URCommentsFilterEnabled.checked == true){
  1088. setTimeout(URComments.FilterURs('filterenabled'), 0);
  1089. //}
  1090. });
  1091.  
  1092. var avdd = localStorage.getItem('URCommentsFilterEnabled');
  1093. if (avdd === null) {
  1094. avdd = true;
  1095. }
  1096. $("#URCommentsFilterEnabled").prop('checked', eval(avdd));
  1097.  
  1098. //enable or disable ur pill counts
  1099. d = $('<label Title="' + URC_Text_tooltip[10] + '"><input type="checkbox" id="URCommentsPillEnabled" class="URCommentsCheckbox"> ' + URC_Text[10] + '</input></label><br><br>');
  1100. //$("#sidepanel-URComments-list").append(d);
  1101. $("#sidepanel-URComments-URO-Presets").append(d);
  1102. $("#URCommentsPillEnabled").click(function() {
  1103. $(localStorage.setItem('URCommentsPillEnabled', URCommentsPillEnabled.checked));
  1104.  
  1105. //if(URCommentsPillEnabled.checked == true){
  1106. setTimeout(URComments.FilterURs('filterenabled'), 0);
  1107. //}
  1108. });
  1109.  
  1110. var avdd = localStorage.getItem('URCommentsPillEnabled');
  1111. if (avdd === null) {
  1112. avdd = true;
  1113. }
  1114. $("#URCommentsPillEnabled").prop('checked', eval(avdd));
  1115.  
  1116. //hide inbetween ur
  1117. d = $('<label Title="' + URC_Text_tooltip[12] + '"><input type="checkbox" id="URCommentsHideInbetween" class="URCommentsCheckbox"> ' + URC_Text[12] + '</input></label><br>');
  1118. //$("#sidepanel-URComments-list").append(d);
  1119. $("#sidepanel-URComments-URO-Presets").append(d);
  1120. $("#URCommentsHideInbetween").click(function() {
  1121. $(localStorage.setItem('URCommentsHideInbetween', URCommentsHideInbetween.checked));
  1122. setTimeout(URComments.FilterURs('hideInbetween'), 0);
  1123. });
  1124.  
  1125. var avdd = localStorage.getItem('URCommentsHideInbetween');
  1126. if (avdd === null) {
  1127. avdd = true;
  1128. }
  1129. $("#URCommentsHideInbetween").prop('checked', eval(avdd));
  1130.  
  1131. //hide UR that are not "mine"
  1132. d = $('<label Title="' + URC_Text_tooltip[13] + '"><input type="checkbox" id="URCommentsHideNotMyUR" class="URCommentsCheckbox"> ' + URC_Text[13] + '</input></label><br>');
  1133. //$("#sidepanel-URComments-list").append(d);
  1134. $("#sidepanel-URComments-URO-Presets").append(d);
  1135. $("#URCommentsHideNotMyUR").click(function() {
  1136. $(localStorage.setItem('URCommentsHideNotMyUR', URCommentsHideNotMyUR.checked));
  1137. setTimeout(URComments.FilterURs('URCommentsHideNotMyUR'), 0);
  1138. });
  1139.  
  1140. var avdd = localStorage.getItem('URCommentsHideNotMyUR');
  1141. if (avdd === null) {
  1142. avdd = true;
  1143. }
  1144. $("#URCommentsHideNotMyUR").prop('checked', eval(avdd));
  1145.  
  1146. //show UR that have gone past the close day setting
  1147. d = $('<label Title="' + URC_Text_tooltip[14] + '"><input type="checkbox" id="URCommentsShowPastClose" class="URCommentsCheckbox"> ' + URC_Text[14] + '</input></label><br>');
  1148. //$("#sidepanel-URComments-list").append(d);
  1149. $("#sidepanel-URComments-URO-Presets").append(d);
  1150. $("#URCommentsShowPastClose").click(function() {
  1151. $(localStorage.setItem('URCommentsShowPastClose', URCommentsShowPastClose.checked));
  1152. setTimeout(URComments.FilterURs('URCommentsShowPastClose'), 0);
  1153. });
  1154.  
  1155. var avdd = localStorage.getItem('URCommentsShowPastClose');
  1156. if (avdd === null) {
  1157. avdd = true;
  1158. }
  1159. $("#URCommentsShowPastClose").prop('checked', eval(avdd));
  1160.  
  1161. //hide reminders
  1162. d = $('<label Title="' + URC_Text_tooltip[15] + '"><input type="checkbox" id="URCommentsHideReminderNeeded" class="URCommentsCheckbox"> ' + URC_Text[15] + '</input></label><br><br>');
  1163. //$("#sidepanel-URComments-list").append(d);
  1164. $("#sidepanel-URComments-URO-Presets").append(d);
  1165. $("#URCommentsHideReminderNeeded").click(function() {
  1166. $(localStorage.setItem('URCommentsHideReminderNeeded', URCommentsHideReminderNeeded.checked));
  1167. setTimeout(URComments.FilterURs('URCommentsHideReminderNeeded'), 0);
  1168. });
  1169.  
  1170. var avdd = localStorage.getItem('URCommentsHideReminderNeeded');
  1171. if (avdd === null) {
  1172. avdd = false;
  1173. }
  1174. $("#URCommentsHideReminderNeeded").prop('checked', eval(avdd));
  1175.  
  1176. //hide replies
  1177. d = $('<label Title="' + URC_Text_tooltip[16] + '"><input type="checkbox" id="URCommentsHideReplies" class="URCommentsCheckbox"> ' + URC_Text[16] + '</input></label><br>');
  1178. //$("#sidepanel-URComments-list").append(d);
  1179. $("#sidepanel-URComments-URO-Presets").append(d);
  1180. $("#URCommentsHideReplies").click(function() {
  1181. $(localStorage.setItem('URCommentsHideReplies', URCommentsHideReplies.checked));
  1182. setTimeout(URComments.FilterURs('URCommentsHideReplies'), 0);
  1183. });
  1184.  
  1185. var avdd = localStorage.getItem('URCommentsHideReplies');
  1186. if (avdd === null) {
  1187. avdd = false;
  1188. }
  1189. $("#URCommentsHideReplies").prop('checked', eval(avdd));
  1190.  
  1191. //hide older than 7 day
  1192. d = $('<label Title="' + URC_Text_tooltip[17] + '"><input type="checkbox" id="URCommentsHideCloseNeeded" class="URCommentsCheckbox"> ' + URC_Text[17] + '</input></label><br>');
  1193. //$("#sidepanel-URComments-list").append(d);
  1194. $("#sidepanel-URComments-URO-Presets").append(d);
  1195. $("#URCommentsHideCloseNeeded").click(function() {
  1196. $(localStorage.setItem('URCommentsHideCloseNeeded', URCommentsHideCloseNeeded.checked));
  1197. setTimeout(URComments.FilterURs('URCommentsHideCloseNeeded'), 0);
  1198. });
  1199.  
  1200. var avdd = localStorage.getItem('URCommentsHideCloseNeeded');
  1201. if (avdd === null) {
  1202. avdd = false;
  1203. }
  1204. $("#URCommentsHideCloseNeeded").prop('checked', eval(avdd));
  1205.  
  1206. //hide initial (zero comments)
  1207. d = $('<label Title="' + URC_Text_tooltip[18] + '"><input type="checkbox" id="URCommentsHideInital" class="URCommentsCheckbox"> ' + URC_Text[18] + '</input></label><br>');
  1208. //$("#sidepanel-URComments-list").append(d);
  1209. $("#sidepanel-URComments-URO-Presets").append(d);
  1210. $("#URCommentsHideInital").click(function() {
  1211. $(localStorage.setItem('URCommentsHideInital', URCommentsHideInital.checked));
  1212. setTimeout(URComments.FilterURs('URCommentsHideInital'), 0);
  1213. });
  1214.  
  1215. var avdd = localStorage.getItem('URCommentsHideInital');
  1216. if (avdd === null) {
  1217. avdd = false;
  1218. }
  1219. $("#URCommentsHideInital").prop('checked', eval(avdd));
  1220.  
  1221. //Hide UR that do not have descriptions
  1222. d = $('<label Title="' + URC_Text_tooltip[19] + '"><input type="checkbox" id="URCommentsHideWithoutDescript" class="URCommentsCheckbox"> ' + URC_Text[19] + '</input></label><br>');
  1223. //$("#sidepanel-URComments-list").append(d);
  1224. $("#sidepanel-URComments-URO-Presets").append(d);
  1225. $("#URCommentsHideWithoutDescript").click(function() {
  1226. $(localStorage.setItem('URCommentsHideWithoutDescript', URCommentsHideWithoutDescript.checked));
  1227. setTimeout(URComments.FilterURs('HideWithoutDescript'), 0);
  1228. });
  1229.  
  1230. var avdd = localStorage.getItem('URCommentsHideWithoutDescript');
  1231. if (avdd === null) {
  1232. avdd = false;
  1233. }
  1234. $("#URCommentsHideWithoutDescript").prop('checked', eval(avdd));
  1235.  
  1236. //Hide UR that have descriptions
  1237. d = $('<label Title="' + URC_Text_tooltip[20] + '"><input type="checkbox" id="URCommentsHideWithDescript" class="URCommentsCheckbox"> ' + URC_Text[20] + '</input></label><br>');
  1238. //$("#sidepanel-URComments-list").append(d);
  1239. $("#sidepanel-URComments-URO-Presets").append(d);
  1240. $("#URCommentsHideWithDescript").click(function() {
  1241. $(localStorage.setItem('URCommentsHideWithDescript', URCommentsHideWithDescript.checked));
  1242. setTimeout(URComments.FilterURs('HideWithDescript'), 0);
  1243. });
  1244.  
  1245. var avdd = localStorage.getItem('URCommentsHideWithDescript');
  1246. if (avdd === null) {
  1247. avdd = false;
  1248. }
  1249. $("#URCommentsHideWithDescript").prop('checked', eval(avdd));
  1250.  
  1251. //hide closed
  1252. d = $('<label Title="' + URC_Text_tooltip[21] + '"><input type="checkbox" id="URCommentsHideClosed" class="URCommentsCheckbox"> ' + URC_Text[21] + '</input></label><br>');
  1253. //$("#sidepanel-URComments-list").append(d);
  1254. $("#sidepanel-URComments-URO-Presets").append(d);
  1255. $("#URCommentsHideClosed").click(function() {
  1256. $(localStorage.setItem('URCommentsHideClosed', URCommentsHideClosed.checked));
  1257. setTimeout(URComments.FilterURs('URCommentsHideClosed'), 0);
  1258. });
  1259.  
  1260. var avdd = localStorage.getItem('URCommentsHideClosed');
  1261. if (avdd === null) {
  1262. avdd = true;
  1263. }
  1264. $("#URCommentsHideClosed").prop('checked', eval(avdd));
  1265.  
  1266. //hide notes
  1267. d = $('<label Title="' + URC_Text_tooltip[22] + '"><input type="checkbox" id="URCommentsHideNotes" class="URCommentsCheckbox"> ' + URC_Text[22] + '</input></label><br><br>');
  1268. //$("#sidepanel-URComments-list").append(d);
  1269. $("#sidepanel-URComments-URO-Presets").append(d);
  1270. $("#URCommentsHideNotes").click(function() {
  1271. $(localStorage.setItem('URCommentsHideNotes', URCommentsHideNotes.checked));
  1272. setTimeout(URComments.FilterURs('URCommentsHideNotes'), 0);
  1273. });
  1274.  
  1275. var avdd = localStorage.getItem('URCommentsHideNotes');
  1276. if (avdd === null) {
  1277. avdd = false;
  1278. }
  1279. $("#URCommentsHideNotes").prop('checked', eval(avdd));
  1280.  
  1281. //days used to filter UR (reminder days / close days)
  1282. var d = $('<form>' + URC_Text[23] + '<input type="text" id="ReminderDays" style="width: 35px;"><br>' + URC_Text[24] + ' <input type="text" id="CloseDays" style="width: 35px;"><br> </form><br><br><br><br><br><br>');
  1283. $("#sidepanel-URComments-URO-Presets").append(d);
  1284.  
  1285. //load reminder days
  1286. $('#ReminderDays').val(localStorage.getItem('ReminderDays'));
  1287. //load close days
  1288. $('#CloseDays').val(localStorage.getItem('CloseDays'));
  1289. //on load validation
  1290. if ($('#ReminderDays').val() < 0) { //|| $('#ReminderDays').val() >= $('#CloseDays').val()
  1291. $('#ReminderDays').val('0');
  1292. $(localStorage.setItem('ReminderDays', $('#ReminderDays').val()));
  1293. }
  1294. if ($('#CloseDays').val() < 1) { // || $('#CloseDays').val() <= $('#ReminderDays').val()
  1295. $('#CloseDays').val('7');
  1296. $(localStorage.setItem('CloseDays', $('#CloseDays').val()));
  1297. }
  1298.  
  1299. //reminder days verification
  1300. $("#ReminderDays").change(function() {
  1301. $(localStorage.setItem('ReminderDays', $('#ReminderDays').val()));
  1302. setTimeout(URComments.FilterURs('ReminderDaysChange'), 0);
  1303. });
  1304.  
  1305. //close days verification
  1306. $("#CloseDays").change(function() {
  1307. if ($('#CloseDays').val() < 1) { //|| $('#CloseDays').val() <= $('#ReminderDays').val()
  1308. $('#CloseDays').val('7');
  1309. alert(URC_USER_PROMPT[3]); //"URComments you can not set close days to zero days";
  1310. } else {
  1311. //save
  1312. $(localStorage.setItem('CloseDays', $('#CloseDays').val()));
  1313. setTimeout(URComments.FilterURs('CloseDaysChange'), 0);
  1314. }
  1315. });
  1316.  
  1317. //start generating the comment list and mouse click handlers
  1318. //urcToConsole("Start adding comments to the comment tab");
  1319. //comments setup
  1320. d = "";
  1321.  
  1322. //CurrentIndex is used to keep count of total arrays pairs which is used on the div's id tags
  1323. var CurrentIndex = 1;
  1324. //urcToConsole("Create Div 1");
  1325.  
  1326. //setup the comment color var
  1327. var colorrr = "CC0000";
  1328. var Title = "";
  1329. var URCommentURLNote = "";
  1330.  
  1331. //go over the array and generate comment divs
  1332. for (var i = 0; i < URCommentsArray.length; i = i + 3) {
  1333. //urcToConsole("Create div for - " + URCommentsArray[i] + " " + URCommentsArray[i + 2]);
  1334.  
  1335. // make the URStatus lower case
  1336. var URStatus = (URCommentsArray[i + 2]).toLowerCase();
  1337.  
  1338. if (URStatus === "open") {
  1339. //black
  1340. colorrr = "#000000";
  1341. } else if (URStatus === "solved") {
  1342. //green
  1343. colorrr = "#008F00";
  1344. } else if (URStatus === "notidentified") {
  1345. //orange
  1346. colorrr = "#E68A00";
  1347. } else {
  1348. //red - not defined and that is a problem
  1349. colorrr = "#CC0000";
  1350.  
  1351. }
  1352. //escaping titles and comments with escapeHtml(Comment) so we can display items with special char as html;
  1353. //generate the comment links
  1354.  
  1355. Title = URCommentsArray[i];
  1356. var Comment = URComments.escapeHtml(URCommentsArray[i + 1]);
  1357.  
  1358. //normal comment link
  1359. d = '<div><a id="URComments-comment' + CurrentIndex + '" class="URComments" style="color:' + colorrr + '" Title="Title: ' + Title + ' Action: ' + URStatus + '; Comment: ' + Comment + ' ">' + Title + '</a>';
  1360. //$("#sidepanel-Comments").append(d);
  1361.  
  1362. if (URCommentsArray[i] === URCommentsArray[CloseNotIdentifiedPosistion] && localStorage.getItem('DBLClk7DCAutoSend') == "yes" || localStorage.getItem('DBLClkAll') == "yes") {
  1363. if (URCommentsArray[i] !== "<br>") {
  1364. d = d + '<a id="URComments-commentDBLCLK' + CurrentIndex + '" class="URComments" style="color:' + colorrr + '" Title="' + URC_Text_tooltip[42] + Title + '"> ' + URC_Text[42] + '</a>'; //double click links
  1365.  
  1366. }
  1367. }
  1368.  
  1369. d = d + '</div>';
  1370.  
  1371. //add comment to list
  1372. $("#sidepanel-URComments-list").append(d);
  1373.  
  1374. //set urID to zero so we don't freak out the functions expecting a UR ID
  1375. urID = 0;
  1376.  
  1377. //create the click function for each comment
  1378. $("#URComments-comment" + CurrentIndex).click(URComments.AutoZoomIN(URCommentsArray[i], URCommentsArray[i + 1], URStatus, urID));
  1379.  
  1380. //create the double click function for each comment
  1381. if (URCommentsArray[i] !== "<br>" && URCommentsArray[i] === URCommentsArray[CloseNotIdentifiedPosistion] && localStorage.getItem('DBLClk7DCAutoSend') == "yes" || localStorage.getItem('DBLClkAll') == "yes") {
  1382. //use this to click send automatically
  1383. if (URCommentsArray[i] !== "<br>") {
  1384. $("#URComments-commentDBLCLK" + CurrentIndex).dblclick(URComments.AutoZoomIN(URCommentsArray[i], URCommentsArray[i + 1], URStatus, urID, "AutoSendComment"));
  1385. }
  1386.  
  1387. }
  1388.  
  1389. //inc the CurrentIndex
  1390. CurrentIndex++;
  1391. }
  1392.  
  1393. //add 2 br to the end of the list for lower resolution monitors
  1394. d = '<br><br>';
  1395. $("#sidepanel-URComments-list").append(d);
  1396.  
  1397.  
  1398. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1399. //////
  1400. ////// URO+ Preset filters
  1401. //////
  1402. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1403.  
  1404. //urcToConsole("Start adding URO preset filters to the comment tab");
  1405.  
  1406. /*
  1407. //URO+ new ur with no description
  1408. var d = $('<div><a id="URONewNoDescription" class="URCommentsPresets" Title="Use URO+ to only show new requests without descriptions">URO+ New UR without descriptions</a></div>');
  1409. $("#sidepanel-URComments-URO-Presets").append(d);
  1410. $("#URONewNoDescription").click(URComments.UROClearClicked('URONewNoDescription'));
  1411.  
  1412. //URO+ new ur
  1413. d = $('<div><a id="URCommentURONEW" class="URCommentsPresets" Title="Use URO+ to only show new requests or ones that have replies from the requestor">URO+ New requests / UR replies</a></div>');
  1414. $("#sidepanel-URComments-URO-Presets").append(d);
  1415. $("#URCommentURONEW").click(URComments.UROClearClicked('UroShowNew'));
  1416.  
  1417. //show no responses for reminders
  1418. d = $('<div><a id="URCommentURO4DayFollowUp" class="URCommentsPresets" Title="Use URO+ to only show URs that need a reminders message sent to them">URO+ Reminder message</a></div>');
  1419. $("#sidepanel-URComments-URO-Presets").append(d);
  1420. //create the callback function
  1421. $("#URCommentURO4DayFollowUp").click(URComments.UROClearClicked('URO4DayFollowUp'));
  1422.  
  1423. //show no responses for 7 days needs closing
  1424. d = $('<div><a id="URCommentURO7Day" class="URCommentsPresets" Title="Use URO+ to only show URs that are older than 7 days and need to be closed">URO+ 7 Day</a></div>');
  1425. $("#sidepanel-URComments-URO-Presets").append(d);
  1426. //create the callback function
  1427. $("#URCommentURO7Day").click(URComments.UROClearClicked('URO7Day'));
  1428.  
  1429. //show no responses for 8 days needs closing
  1430. d = $('<div><a id="URCommentURO8Day" class="URCommentsPresets" Title="Use URO+ to only show URs that are older than 8 days and need to be closed">URO+ 8 Day</a></div>');
  1431. $("#sidepanel-URComments-URO-Presets").append(d);
  1432. //create the callback function
  1433. $("#URCommentURO8Day").click(URComments.UROClearClicked('URO8Day'));
  1434.  
  1435. //show no responses for 10 days needs closing
  1436. d = $('<div><a id="URCommentURO10Day" class="URCommentsPresets" Title="Use URO+ to only show URs that are older than 10 days and need to be closed">URO+ 10 Day</a></div>');
  1437. $("#sidepanel-URComments-URO-Presets").append(d);
  1438. //create the callback function
  1439. $("#URCommentURO10Day").click(URComments.UROClearClicked('URO10Day'));
  1440.  
  1441. //show no responses for 24 Hour Notice now needs closing
  1442. d = $('<div><a id="URCommentURO24Hr" class="URCommentsPresets" Title="URO+ 8 day 24 Hour Notice. the idea behind this one is that on day 7 you will send 24 hour notices and then 24 hours later come back with this preset to find the ones that need closing">24 Hour Notice expermintal</a></div>');
  1443. $("#sidepanel-URComments-URO-Presets").append(d);
  1444. //create the callback function
  1445. $("#URCommentURO24Hr").click(URComments.UROClearClicked('URO24Hr'));
  1446. */
  1447. //URO+ clear
  1448. //var d = $('<div><a id="URCommentUROclearUROFiltrs" class="URCommentsPresets" Title="Clears all of the checks boxes in URO’s URs tab, except for Do not apply state/age filters to tagged URs and if you have Only My URs enabled in URComments">URO+ Clear UR Filters</a></div>');
  1449. //$("#sidepanel-URComments-URO-Presets").append(d);
  1450. //create the callback function
  1451. //$("#URCommentUROclearUROFiltrs").click(URComments.UROClearClicked('UROclearUROFiltrs'));
  1452.  
  1453. /*
  1454. //the predefined presets only show comments that the current user has commented on
  1455. d = $('<label Title="Use URO+ to only Show URs with comments from me"><input type="checkbox" id="URCommentUROOnlyMyUR" class="URCommentsCheckbox"> Only My URs</input></label><br>');
  1456. $("#sidepanel-URComments-URO-Presets").append(d);
  1457. //create the callback function
  1458. $("#URCommentUROOnlyMyUR").click(URComments.OnlyMyUR);
  1459.  
  1460. //the predefined presets only show comments that the current user has commented on
  1461. d = $('<label Title="Use URO+ to hide tagged pins. This setting will not be saved."><input type="checkbox" id="URCommentUROHideTagged" class="URCommentsCheckbox"> Temporarily hide tagged pins</input></label><br><br>');
  1462. $("#sidepanel-URComments-URO-Presets").append(d);
  1463. //create the callback function
  1464. $("#URCommentUROHideTagged").click(URComments.HideTagged("trash"));
  1465. */
  1466.  
  1467. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1468. //////
  1469. ////// Draw Options
  1470. //////
  1471. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1472.  
  1473. //Auto Set ur comment on new URs
  1474. d = $('<label Title="' + URC_Text_tooltip[25] + '"><input type="checkbox" id="UrCommentAutoSetNewComment" class="URCommentsCheckbox"> ' + URC_Text[25] + '</input></label><br>');
  1475. $("#sidepanel-URComments-settings").append(d);
  1476. //create the callback function
  1477. $("#UrCommentAutoSetNewComment").click(URComments.AutoSetNewComment);
  1478.  
  1479. //Auto Set ur reminder on new URs
  1480. d = $('<label Title="' + URC_Text_tooltip[26] + '"><input type="checkbox" id="UrCommentAutoSet4dayComment" class="URCommentsCheckbox"> ' + URC_Text[26] + '</input></label><br>');
  1481. $("#sidepanel-URComments-settings").append(d);
  1482. //create the callback function
  1483. $("#UrCommentAutoSet4dayComment").click(URComments.UrCommentAutoSet4dayComment);
  1484.  
  1485. //auto zoom in for new with no comments
  1486. d = $('<label Title="' + URC_Text_tooltip[27] + '"><input type="checkbox" id="UrCommentNewZoomIn" class="URCommentsCheckbox"> ' + URC_Text[27] + '</input></label><br>');
  1487. $("#sidepanel-URComments-settings").append(d);
  1488. //create the callback function
  1489. $("#UrCommentNewZoomIn").click(URComments.NewZoomIn);
  1490.  
  1491. //auto center at current zoom for UR with comments
  1492. d = $('<label Title="' + URC_Text_tooltip[28] + '"><input type="checkbox" id="UrCommentWithCommentRecenter" class="URCommentsCheckbox"> ' + URC_Text[28] + '</input></label><br>');
  1493. $("#sidepanel-URComments-settings").append(d);
  1494. //create the callback function
  1495. $("#UrCommentWithCommentRecenter").click(URComments.WithCommentRecenter);
  1496.  
  1497. //Auto Click open solved not Identified
  1498. d = $('<label Title="' + URC_Text_tooltip[29] + '"><input type="checkbox" id="URCommentAutoClickURStatus" class="URCommentsCheckbox"> ' + URC_Text[29] + '</input></label><br>');
  1499. $("#sidepanel-URComments-settings").append(d);
  1500. //create the callback function
  1501. $("#URCommentAutoClickURStatus").click(URComments.AutoClickURStatus);
  1502.  
  1503. //UrCommentSaveAfterComment
  1504. d = $('<label Title="' + URC_Text_tooltip[30] + '"><input type="checkbox" id="UrCommentSaveAfterComment" class="URCommentsCheckbox"> ' + URC_Text[30] + '</input></label><br>');
  1505. $("#sidepanel-URComments-settings").append(d);
  1506. //create the callback function
  1507. $("#UrCommentSaveAfterComment").click(URComments.SaveAfterComment);
  1508.  
  1509. //auto close after sending comment replies
  1510. d = $('<label Title="' + URC_Text_tooltip[31] + '"><input type="checkbox" id="UrCommentAutoCloseComment" class="URCommentsCheckbox"> ' + URC_Text[31] + '</input></label><br>');
  1511. $("#sidepanel-URComments-settings").append(d);
  1512. //create the callback function
  1513. $("#UrCommentAutoCloseComment").click(URComments.AutoCloseComment);
  1514.  
  1515. //auto reload map after sending comment replies
  1516. //d = $('<label Title="' + URC_Text_tooltip[32] + '"><input type="checkbox" id="UrCommentAutoReloadAfterComment" class="URCommentsCheckbox"> ' + URC_Text[32] + '</input></label><br>');
  1517. //$("#sidepanel-URComments-settings").append(d);
  1518. //create the callback function
  1519. //$("#UrCommentAutoReloadAfterComment").click(URComments.AutoReloadAfterComment);
  1520.  
  1521. //zoom out map after sending comment replies
  1522. d = $('<label Title="' + URC_Text_tooltip[33] + '"><input type="checkbox" id="UrCommentZoomOutAfterComment" class="URCommentsCheckbox"> ' + URC_Text[33] + '</input></label><br>');
  1523. $("#sidepanel-URComments-settings").append(d);
  1524. //create the callback function
  1525. $("#UrCommentZoomOutAfterComment").click(URComments.ZoomOutAfterComment);
  1526.  
  1527. //Auto switch to the URComments tab after page load
  1528. d = $('<label Title="' + URC_Text_tooltip[34] + '"><input type="checkbox" id="UrCommentAutoSwitchToURCommentsTab" class="URCommentsCheckbox"> ' + URC_Text[34] + '</input></label><br>');
  1529. $("#sidepanel-URComments-settings").append(d);
  1530. //create the callback function
  1531. $("#UrCommentAutoSwitchToURCommentsTab").click(URComments.AutoSwitchToURCommentsTab);
  1532.  
  1533. //Double clicking the 7 day close comment will auto send the 7day close comment
  1534. d = $('<label Title="' + URC_Text_tooltip[35] + '"><input type="checkbox" id="UrCommentDBLClk7DCAutoSend" class="URCommentsCheckbox"> ' + URC_Text[35] + '</input></label><br>');
  1535. $("#sidepanel-URComments-settings").append(d);
  1536. //create the callback function
  1537. $("#UrCommentDBLClk7DCAutoSend").click(URComments.DBLClk7DCAutoSend);
  1538.  
  1539. //Double clicking comments will auto send comments
  1540. d = $('<label Title="' + URC_Text_tooltip[36] + '"><input type="checkbox" id="UrCommentDBLClkAll" class="URCommentsCheckbox"> ' + URC_Text[36] + '</input></label><br>');
  1541. $("#sidepanel-URComments-settings").append(d);
  1542. //create the callback function
  1543. $("#UrCommentDBLClkAll").click(URComments.DBLClkAll);
  1544.  
  1545. //go over BoilerPlateCreatorsArray and generate the select
  1546. d = '<font style="font-size: 12px;">' + URC_Text[37] + ' <select id="BoilerPlateCreators" style="font-size: 12px; margin-top: 5px;" title="' + URC_Text_tooltip[37] + '">';
  1547. for (i = 0; i < BoilerPlateCreatorsArray.length; i = i + 1) {
  1548. urcToConsole("BoilerPlateCreatorsArray " + BoilerPlateCreatorsArray[i]);
  1549. d = d + '<option style="font-size 12px;" value="' + BoilerPlateCreatorsArray[i] + '">' + BoilerPlateCreatorsArray[i] + '</option>';
  1550. }
  1551. d = d + "</select> </font><br><br>";
  1552. $("#sidepanel-URComments-settings").append(d);
  1553. //create call back for the select
  1554. $("#BoilerPlateCreators").change(URComments.BoilerPlateCreatorsFunction);
  1555.  
  1556. //UrCommentDisableURDoneBtn
  1557. d = $('<label Title="' + URC_Text_tooltip[38] + '"><input type="checkbox" id="UrCommentDisableURDoneBtn" class="URCommentsCheckbox"> ' + URC_Text[38] + '</input></label><br>');
  1558. //$("#sidepanel-URComments-list").append(d);
  1559. $("#sidepanel-URComments-settings").append(d);
  1560. $("#UrCommentDisableURDoneBtn").click(function() {
  1561. $(localStorage.setItem('UrCommentDisableURDoneBtn', UrCommentDisableURDoneBtn.checked));
  1562. });
  1563.  
  1564. var avdd = localStorage.getItem('UrCommentDisableURDoneBtn');
  1565. if (avdd === null) {
  1566. avdd = true;
  1567. }
  1568. $("#UrCommentDisableURDoneBtn").prop('checked', eval(avdd));
  1569.  
  1570. //URCommentURUnfollow
  1571. d = $('<label Title="' + URC_Text_tooltip[39] + '"><input type="checkbox" id="URCommentURUnfollow" class="URCommentsCheckbox"> ' + URC_Text[39] + '</input></label><br>');
  1572. $("#sidepanel-URComments-settings").append(d);
  1573. $("#URCommentURUnfollow").click(function() {
  1574. $(localStorage.setItem('URCommentURUnfollow', URCommentURUnfollow.checked));
  1575. });
  1576.  
  1577. var avdd = localStorage.getItem('URCommentURUnfollow');
  1578. if (avdd === null) {
  1579. avdd = false;
  1580. }
  1581. $("#URCommentURUnfollow").prop('checked', eval(avdd));
  1582.  
  1583. //when on screen auto send my own reminders
  1584. d = $('<label Title="' + URC_Text_tooltip[40] + '"><input type="checkbox" id="URCommentsAutoSendMyReminders" class="URCommentsCheckbox"> ' + URC_Text[40] + '</input></label><br>');
  1585. $("#sidepanel-URComments-settings").append(d);
  1586. $("#URCommentsAutoSendMyReminders").click(function() {
  1587.  
  1588. if (URCommentsAutoSendMyReminders.checked == true) {
  1589. var r = confirm(URC_USER_PROMPT[11]); //"URComments This will send reminders at the reminder days setting. This only happens when they are in your visible area. NOTE: when using this feature you should not leave any UR open unless you had a question that needed an answer from the wazer as this script will send those reminders. "
  1590.  
  1591. //this is where we reuse the r var this makes the nested ifs much more simple
  1592. if (r === true) {
  1593. setTimeout(URComments.FilterURs('URCommentsAutoSendMyReminders'), 0);
  1594. } else {
  1595. $("#URCommentsAutoSendMyReminders").prop('checked', false);
  1596.  
  1597. }
  1598. }
  1599. $(localStorage.setItem('URCommentsAutoSendMyReminders', URCommentsAutoSendMyReminders.checked));
  1600. });
  1601.  
  1602. var avdd = localStorage.getItem('URCommentsAutoSendMyReminders');
  1603. if (avdd === null) {
  1604. avdd = false;
  1605. }
  1606. $("#URCommentsAutoSendMyReminders").prop('checked', eval(avdd));
  1607.  
  1608. d = $('<label Title="' + URC_Text_tooltip[41] + '"><input type="checkbox" id="URCommentsReplaceTagWithEditorName" class="URCommentsCheckbox"> ' + URC_Text[41] + '</input></label><br>');
  1609. $("#sidepanel-URComments-settings").append(d);
  1610. $("#URCommentsReplaceTagWithEditorName").click(function() {
  1611. $(localStorage.setItem('URCommentsReplaceTagWithEditorName', URCommentsReplaceTagWithEditorName.checked));
  1612. setTimeout(URComments.FilterURs('URCommentsReplaceTagWithEditorName'), 0);
  1613. });
  1614.  
  1615. var avdd = localStorage.getItem('URCommentsReplaceTagWithEditorName');
  1616. if (avdd === null) {
  1617. avdd = false;
  1618. }
  1619. $("#URCommentsReplaceTagWithEditorName").prop('checked', eval(avdd));
  1620.  
  1621. urcToConsole("Tab Complete");
  1622.  
  1623. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1624. //////
  1625. ////// Load and set saved options
  1626. //////
  1627. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1628.  
  1629. //URComments tab is loaded load options to last state
  1630. //here we also check to see if the options have ever been set (new user) if not we enable them all on script load
  1631. //enabling them will trigger a click of the option which will cause the option to be saved
  1632.  
  1633. //OnlyMyUR have the predefined pre-sets only show comments that the current user has commented on
  1634. if (localStorage.getItem('OnlyMyUR') == "yes") {
  1635. $("#URCommentUROOnlyMyUR").trigger('click');
  1636. }
  1637.  
  1638. //auto set new urs comment
  1639. if (localStorage.getItem('AutoSetNewComment') == "yes" || !localStorage.getItem('AutoSetNewComment')) {
  1640. $("#UrCommentAutoSetNewComment").trigger('click');
  1641. }
  1642.  
  1643. //auto set 4day urs comment
  1644. if (localStorage.getItem('UrCommentAutoSet4dayComment') == "yes" || !localStorage.getItem('UrCommentAutoSet4dayComment')) {
  1645. $("#UrCommentAutoSet4dayComment").trigger('click');
  1646. }
  1647.  
  1648. //UrCommentAutoCloseComment
  1649. if (localStorage.getItem('UrCommentAutoCloseComment') == "yes" || !localStorage.getItem('UrCommentAutoCloseComment')) {
  1650. $("#UrCommentAutoCloseComment").trigger('click');
  1651. }
  1652.  
  1653. //AutoReloadAfterComment
  1654. //if (localStorage.getItem('AutoReloadAfterComment') == "yes") {
  1655. // $("#UrCommentAutoReloadAfterComment").trigger('click');
  1656. //}
  1657.  
  1658. //NewZoomIn
  1659. if (localStorage.getItem('NewZoomIn') == "yes" || !localStorage.getItem('NewZoomIn')) {
  1660. $("#UrCommentNewZoomIn").trigger('click');
  1661. }
  1662.  
  1663. //auto recenter ur without comments
  1664. if (localStorage.getItem('WithCommentRecenter') == "yes" || !localStorage.getItem('WithCommentRecenter')) {
  1665. $("#UrCommentWithCommentRecenter").trigger('click');
  1666. }
  1667.  
  1668. // URComments load and set settings and check boxes
  1669. if (localStorage.getItem('AutoClickURStatus') == "yes" || !localStorage.getItem('AutoClickURStatus')) {
  1670. $("#URCommentAutoClickURStatus").trigger('click');
  1671. if (localStorage.getItem('DBLClk7DCAutoSend') == "yes" || localStorage.getItem('DBLClkAll') == "yes") {
  1672. $('#URCommentAutoClickURStatus').prop('checked', true);
  1673. localStorage.setItem('AutoClickURStatus', 'yes');
  1674. }
  1675. }
  1676.  
  1677. //UrCommentSaveAfterComment
  1678. if (localStorage.getItem('SaveAfterComment') == "yes" || !localStorage.getItem('SaveAfterComment')) {
  1679. $("#UrCommentSaveAfterComment").trigger('click');
  1680. }
  1681.  
  1682. //AutoZoomOutAfterComment
  1683. if (localStorage.getItem('ZoomOutAfterComment') == "yes" || !localStorage.getItem('ZoomOutAfterComment')) {
  1684. $("#UrCommentZoomOutAfterComment").trigger('click');
  1685. }
  1686.  
  1687. //AutoSwitchToURCommentsTab
  1688. if (localStorage.getItem('AutoSwitchToURCommentsTab') == "yes" || !localStorage.getItem('AutoSwitchToURCommentsTab')) {
  1689. $("#UrCommentAutoSwitchToURCommentsTab").trigger('click');
  1690. }
  1691.  
  1692. //UrCommentDBLClk7DCAutoSend
  1693. if (localStorage.getItem('DBLClk7DCAutoSend') == "yes") {
  1694. $("#UrCommentDBLClk7DCAutoSend").prop('checked', true);
  1695. $("#AutoClickURStatus").prop('checked', true);
  1696. localStorage.setItem('AutoClickURStatus', 'yes');
  1697. }
  1698.  
  1699. //UrCommentDBLClkAll
  1700. if (localStorage.getItem('DBLClkAll') == "yes") {
  1701. $("#UrCommentDBLClkAll").prop('checked', true);
  1702. $("#AutoClickURStatus").prop('checked', true);
  1703. localStorage.setItem('AutoClickURStatus', 'yes');
  1704. }
  1705.  
  1706. //set the users BoilerPlateCreators choice in the select
  1707. var SelectedBoilerPlateCreator = localStorage.getItem('BoilerPlateCreators');
  1708. $("#BoilerPlateCreators").val(SelectedBoilerPlateCreator);
  1709. //end getting boilerplatecreators
  1710.  
  1711. //check to see if the option to auto switch to the URComments tab is enabled
  1712. //if (UrCommentAutoSwitchToURCommentsTab.checked) {
  1713. // //make UR Comments tab active
  1714. // $('#CommentsTab').trigger('click');
  1715. //}
  1716.  
  1717. if (URCommentUpdateMessage === "yes") {
  1718. //alert the user in URComment version updates
  1719. if (localStorage.getItem('URCommentVersion') === URCommentVersion) {
  1720. urcToConsole("Version - " + URCommentVersion);
  1721. } else {
  1722. alert(URCommentVersionUpdateNotes);
  1723. localStorage.setItem('URCommentVersion', URCommentVersion);
  1724. }
  1725. }
  1726.  
  1727. //set the background of the last used URO preset
  1728. //URComments.UROPresetHighlight(localStorage.getItem('UROCurrentPeset'));
  1729.  
  1730. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1731. //////
  1732. ////// Launch background task(s)
  1733. //////
  1734. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1735.  
  1736. //start looking for opened UR's window
  1737. setTimeout(URComments.LookForOpenedUR, 1000);
  1738.  
  1739. //reset URO the hiding of tagged pin
  1740. //setTimeout(URComments.HideTagged("startup"), 10000);
  1741.  
  1742. setTimeout(URComments.URCLoadUpdateRequestsEvents, 0);
  1743.  
  1744. //enable exp road $( ".toggler label span:contains('Roads experimental')" ).click();// turn on experimental roads layer
  1745. $(".toggler label span:contains('Me!')").click(); //auto enable wme me!
  1746. //end of URCommentsinit
  1747. };
  1748.  
  1749. ///////////////////////////////////////////////////////////////////////////////////
  1750. //////
  1751. ////// Background task(s)
  1752. //////
  1753. ///////////////////////////////////////////////////////////////////////////////////
  1754.  
  1755. //look for the UR window to be open
  1756. URComments.LookForOpenedUR = function() {
  1757. //urcToConsole("look for open UR window " + (new Date()).getTime());
  1758. //check for an open UR and that the UR's text area is shown
  1759.  
  1760. //relaunch checking for open ur - moved this up here so the script would keep trying if I had an error
  1761. setTimeout(URComments.LookForOpenedUR, 500); //line 892
  1762.  
  1763. var urID = 0;
  1764.  
  1765. urID = $(".update-requests .selected").data("id");
  1766.  
  1767. if (urID > 0 && typeof urID !== 'undefined') {
  1768.  
  1769. //new or same ur (re))open(ed) so now we can do stuff; this prevents this function to continuously applying settings to a ur
  1770. if (UrCommentLasturID !== urID && $(".new-comment-text").length !== 0) {
  1771. urcToConsole("Found open UR - " + urID);
  1772.  
  1773. //grab the current UR ID for next time
  1774. UrCommentLasturID = urID;
  1775.  
  1776. //url to open a UR
  1777. //https://www.waze.com/editor/?zoom=5&lat=34.024522&lon=-118.297005&mapUpdateRequest=3710607&env=usa
  1778. //https://www.waze.com/editor/?zoom=5&mapUpdateRequest=4271288&env=usa
  1779.  
  1780. //auto expand ur comments list and text area (verify that this is not for the old WME)
  1781. if ($('#edit-request .comment-view-shown').length === 0) {
  1782.  
  1783. setTimeout(function() {
  1784. $('#edit-request .toggle-comment-view').trigger('click');
  1785. }, 0);
  1786. }
  1787.  
  1788. //beta editor auto expand ur comments list and text area
  1789. if ($("#panel-container .problem-edit .conversation").length !== 0) {
  1790. $("#panel-container .problem-edit .conversation").removeClass('collapsed'); //beta editor auto expand UR Comment box
  1791. }
  1792.  
  1793. //beta editor auto expand ur comments more info
  1794. if ($("#panel-container .problem-edit .more-info").length !== 0) {
  1795. $("#panel-container .problem-edit .more-info").removeClass('collapsed'); //beta editor auto expand UR Comment box
  1796. }
  1797.  
  1798. //disable the stupid new done button
  1799. if ($("#panel-container .content .done").length > 0 && UrCommentDisableURDoneBtn.checked === true) {
  1800. $("#panel-container .content .done").attr('disabled', true);
  1801. $("#panel-container .content .done").html('(Done) Disabled by URComments');
  1802. }
  1803.  
  1804. //complaints about editors not reading the description so I am moving the description up a div
  1805. var desc = $(".body .description").html();
  1806. if (desc != undefined) {
  1807. //move the description up a div
  1808. $(".problem-edit .header").after('<div class="description section">' + desc + '</div>');
  1809. $(".problem-edit .body .description").remove();
  1810. }
  1811.  
  1812. //jump to bottom
  1813. $('.problem-edit .comment-list').scrollTop($('.conversation-view .comment-list')[0].scrollHeight);
  1814. $('.problem-edit .problem-data').scrollTop($('.conversation-view .comment-list')[0].scrollHeight);
  1815.  
  1816.  
  1817. //auto fill in comment
  1818. //check what type of message to insert into the ur
  1819. reporter_comment = Waze.model.updateRequestSessions.objects[urID].comments;
  1820. i = reporter_comment.length;
  1821.  
  1822. urcToConsole("LookForOpenedUR number of comments: " + i);
  1823.  
  1824. //if number of comment is zero assume this is a new ur
  1825. if (i === 0) {
  1826. //initial, zero comments
  1827.  
  1828. urcToConsole("LookForOpenedUR no comments");
  1829.  
  1830. if (UrCommentAutoSetNewComment.checked === true) {
  1831. urcToConsole("LookForOpenedUR no comments2");
  1832. //this will be on of the types of UR that a user can choose from when submitting a UR
  1833.  
  1834. var urType = Waze.model.mapUpdateRequests.objects[urID].attributes.type;
  1835.  
  1836. urcToConsole("LookForOpenedUR Found open UR - " + urID + " " + def_names[urType]);
  1837.  
  1838. //loop trough the comment array for a comment that matches the request type.
  1839. for (var ii = 0; ii < URCommentsArray.length; ii = ii + 3) {
  1840. if (URCommentsArray[ii].toLowerCase() === def_names[urType].toLowerCase()) {
  1841. urcToConsole("LookForOpenedUR Matched Comment: " + def_names[urType]);
  1842. setTimeout(URComments.AutoZoomIN(URCommentsArray[ii], URCommentsArray[ii + 1], URCommentsArray[ii + 2], urID), 0);
  1843. }
  1844. }
  1845. }
  1846.  
  1847. } else {
  1848. //4DAY OR 7DAY section
  1849.  
  1850. LastCommentorUserID = reporter_comment[reporter_comment.length - 1].userID;
  1851. urcToConsole("LookForOpenedUR LastCommentorUserID: " + LastCommentorUserID);
  1852.  
  1853. //uro days old
  1854. var commentDaysOld = URComments.uroGetCommentAge(W.model.updateRequestSessions.objects[urID].comments[i - 1]);
  1855. urcToConsole("LookForOpenedUR Days old: " + commentDaysOld);
  1856.  
  1857. //if (i === 1 && commentDaysOld >= 4 && LastCommentorUserID > 1 && UrCommentAutoSet4dayComment.checked === true) {
  1858. var ReminderDays = $('#ReminderDays').val();
  1859. urcToConsole("LookForOpenedUR ReminderDays: " + ReminderDays);
  1860.  
  1861. if (i === 1 && ReminderDays > 0 && commentDaysOld >= ReminderDays && LastCommentorUserID > 1 && UrCommentAutoSet4dayComment.checked === true) {
  1862. //4day - 1 comment, last comment less than 4 days, last comment is not from reporter
  1863. urcToConsole("LookForOpenedUR 4day");
  1864.  
  1865. //4 day ur 1 comment
  1866. setTimeout(URComments.AutoZoomIN(URCommentsArray[ReminderPosistion], URCommentsArray[ReminderPosistion + 1], URCommentsArray[ReminderPosistion + 2], urID), 0);
  1867. }
  1868. //don't allow auto filling of the close message because it clicks the not identified option and causes trouble when the Ur window is shut/closed the next save will mark it as not identified, without a comment.
  1869.  
  1870. }
  1871.  
  1872. var WazeCurrentZoom = "";
  1873. WazeCurrentZoom = URComments.GetWazeMapZoomLevel();
  1874. if (i === 0 && UrCommentNewZoomIn.checked === true) {
  1875. //zoom in new
  1876. //predefined zoom threshold for auto zoom
  1877. var zoom = 4;
  1878.  
  1879. //do not zoom back out if we are already zoomed in and just happen to be re-clicking on a UR.
  1880. if (WazeCurrentZoom < zoom) {
  1881.  
  1882. URComments.gotoURById(urID, 5);
  1883. }
  1884. } else if (UrCommentWithCommentRecenter.checked === true) {
  1885. //re-center on urs that are not zoom in
  1886. if (WazeCurrentZoom < 3) {
  1887. //alert(WazeCurrentZoom);
  1888. URComments.gotoURById(urID, WazeCurrentZoom);
  1889. }
  1890.  
  1891. }
  1892.  
  1893. //auto switch to ur comments tab
  1894. if (UrCommentAutoSwitchToURCommentsTab.checked) {
  1895. //grab the active tab
  1896. PreviousTab = $("h2 + ul.nav-tabs .active a");
  1897. //make UR Comments tab active
  1898. $('#CommentsTab').trigger('click');
  1899. }
  1900. }
  1901.  
  1902.  
  1903. } else {
  1904. //reset the id if a ur is not open so we can set the tab for the same ur
  1905. UrCommentLasturID = "";
  1906. urID = "";
  1907. //switch tab back
  1908. if (UrCommentAutoSwitchToURCommentsTab.checked) {
  1909. //verify that we had found a tab
  1910. if (PreviousTab !== null) {
  1911. //click back on the previous tab
  1912. $(PreviousTab).trigger('click');
  1913. //clear out the previous tab holder
  1914. PreviousTab = null;
  1915. }
  1916. }
  1917. //urcToConsole("LookForOpenedUR Looking for ur...");
  1918. }
  1919.  
  1920. };
  1921.  
  1922. ////////////////////////////////////////////////////////////////////////////
  1923. //////
  1924. ////// Save Options on click
  1925. //////
  1926. ////////////////////////////////////////////////////////////////////////////
  1927.  
  1928. //use uro to only show urs that I have commented on
  1929. URComments.OnlyMyUR = function() {
  1930.  
  1931. //try to save the state of the check box
  1932. if (URCommentUROOnlyMyUR.checked) {
  1933. localStorage.setItem('OnlyMyUR', 'yes');
  1934. } else {
  1935. localStorage.setItem('OnlyMyUR', 'no');
  1936. }
  1937.  
  1938. //only show my ur 'OnlyMyUR'
  1939. if (URCommentUROOnlyMyUR.checked && !_cbHideAnyComments.checked) {
  1940. $("#_cbHideAnyComments").trigger('click');
  1941.  
  1942. } else if (!URCommentUROOnlyMyUR.checked && _cbHideAnyComments.checked) {
  1943. $("#_cbHideAnyComments").trigger('click');
  1944. }
  1945.  
  1946. };
  1947. /*
  1948. //URCommentUROHideTagged
  1949. //use uro to Hide Tagged pins
  1950. URComments.HideTagged = function(when) {
  1951. return function() {
  1952. urcToConsole("URCommentUROHideTagged");
  1953. URComments.TaggedPinsAray = [
  1954. "_cbFilterRoadworks", //
  1955. "_cbFilterConstruction",//
  1956. "_cbFilterClosure", //
  1957. "_cbFilterEvent", //
  1958. "_cbFilterNote" //
  1959. ];
  1960.  
  1961. //go over the array and clear all of the URO+ check boxes
  1962. for (var URComments_URO_Index = 0; URComments_URO_Index < URComments.TaggedPinsAray.length; URComments_URO_Index = URComments_URO_Index + 1) {
  1963. if(when==="startup") {
  1964. if ($('#' + URComments.TaggedPinsAray[URComments_URO_Index]).is(":checked")) {
  1965. $('#URCommentUROHideTagged').prop('checked', true);
  1966. }
  1967.  
  1968.  
  1969. } else {
  1970. urcToConsole("URCommentUROHideTagged " + URComments.TaggedPinsAray[URComments_URO_Index]);
  1971.  
  1972. if ($('#' + URComments.TaggedPinsAray[URComments_URO_Index]).length <= 0) {
  1973. alert("there was an error finding URO's hide tagged pins setting please verify these settings are in the correct state");
  1974. return false;
  1975. }
  1976.  
  1977.  
  1978. if (URCommentUROHideTagged.checked && !$('#' + URComments.TaggedPinsAray[URComments_URO_Index]).is(":checked")) {
  1979. $('#' + URComments.TaggedPinsAray[URComments_URO_Index]).trigger('click');
  1980. } else if (!URCommentUROHideTagged.checked && $('#' + URComments.TaggedPinsAray[URComments_URO_Index]).is(":checked")) {
  1981. $('#' + URComments.TaggedPinsAray[URComments_URO_Index]).trigger('click');
  1982. }
  1983. }
  1984. }
  1985. };
  1986. };
  1987. */
  1988.  
  1989. URComments.AutoClickURStatus = function() {
  1990. //try to save the state of the check box
  1991. if (URCommentAutoClickURStatus.checked) {
  1992. localStorage.setItem('AutoClickURStatus', 'yes');
  1993. //alert("yes");
  1994. } else {
  1995. localStorage.setItem('AutoClickURStatus', 'no');
  1996. //alert("no");
  1997. //turn off save after send
  1998. if (!URCommentAutoClickURStatus.checked && UrCommentSaveAfterComment.checked) {
  1999. $('#UrCommentSaveAfterComment').prop('checked', false);
  2000. localStorage.setItem('SaveAfterComment', 'no');
  2001. }
  2002.  
  2003. if (UrCommentDBLClk7DCAutoSend.checked == true || UrCommentDBLClkAll.checked == true) {
  2004. $('#URCommentAutoClickURStatus').prop('checked', true);
  2005. alert(URC_USER_PROMPT[4]); //"URComments to use the double click links you must have the autoset UR status option enabled"
  2006. localStorage.setItem('AutoClickURStatus', 'yes');
  2007. }
  2008. }
  2009. };
  2010.  
  2011. URComments.SaveAfterComment = function() {
  2012. //try to save the state of the check box
  2013. if (UrCommentSaveAfterComment.checked) {
  2014. localStorage.setItem('SaveAfterComment', 'yes');
  2015. //alert("yes");
  2016. } else {
  2017. localStorage.setItem('SaveAfterComment', 'no');
  2018. //alert("no");
  2019. }
  2020. //when save if on turn on auto click status
  2021. if (UrCommentSaveAfterComment.checked && !URCommentAutoClickURStatus.checked) {
  2022. $('#URCommentAutoClickURStatus').prop('checked', true);
  2023. localStorage.setItem('AutoClickURStatus', 'yes');
  2024. }
  2025. };
  2026.  
  2027. URComments.AutoCloseComment = function() {
  2028. //try to save the state of the check box
  2029. if (UrCommentAutoCloseComment.checked) {
  2030. localStorage.setItem('UrCommentAutoCloseComment', 'yes');
  2031. //alert("yes");
  2032. } else {
  2033. localStorage.setItem('UrCommentAutoCloseComment', 'no');
  2034. //alert("no");
  2035. }
  2036. //alert ( localStorage.getItem('UrCommentAutoCloseComment') );
  2037. };
  2038.  
  2039. // UrCommentAutoReloadAfterComment
  2040. //URComments.AutoReloadAfterComment = function() {
  2041. // UrCommentAutoReloadAfterComment
  2042. //try to save the state of the check box
  2043. // if (UrCommentAutoReloadAfterComment.checked) {
  2044. // localStorage.setItem('AutoReloadAfterComment', 'yes');
  2045. //alert("yes");
  2046. // } else {
  2047. // localStorage.setItem('AutoReloadAfterComment', 'no');
  2048. //alert("no");
  2049. // }
  2050. //};
  2051.  
  2052. URComments.ZoomOutAfterComment = function() {
  2053. if (UrCommentZoomOutAfterComment.checked) {
  2054. localStorage.setItem('ZoomOutAfterComment', 'yes');
  2055. //alert("yes");
  2056. } else {
  2057. localStorage.setItem('ZoomOutAfterComment', 'no');
  2058. //alert("no");
  2059. }
  2060. };
  2061.  
  2062. URComments.AutoSetNewComment = function() {
  2063. //add reply instructions to replies
  2064. //try to save the state of the check box
  2065. if (UrCommentAutoSetNewComment.checked) {
  2066. localStorage.setItem('AutoSetNewComment', 'yes');
  2067. //alert(" AutoSetNewComment yes");
  2068. } else {
  2069. localStorage.setItem('AutoSetNewComment', 'no');
  2070. //alert("AutoSetNewComment no");
  2071. }
  2072. };
  2073.  
  2074. URComments.UrCommentAutoSet4dayComment = function() {
  2075. //add reply instructions to replies
  2076. //try to save the state of the check box
  2077. if (UrCommentAutoSet4dayComment.checked) {
  2078. localStorage.setItem('UrCommentAutoSet4dayComment', 'yes');
  2079. //alert(" UrCommentAutoSet4dayComment yes");
  2080. } else {
  2081. localStorage.setItem('UrCommentAutoSet4dayComment', 'no');
  2082. //alert("UrCommentAutoSet4dayComment no");
  2083. }
  2084. };
  2085.  
  2086. URComments.NewZoomIn = function() {
  2087. //add reply instructions to replies
  2088. //try to save the state of the check box
  2089. if (UrCommentNewZoomIn.checked) {
  2090. localStorage.setItem('NewZoomIn', 'yes');
  2091. //alert(" NewZoomIn yes");
  2092. } else {
  2093. localStorage.setItem('NewZoomIn', 'no');
  2094. //alert("NewZoomIn no");
  2095. }
  2096.  
  2097. };
  2098.  
  2099. URComments.WithCommentRecenter = function() {
  2100. //add reply instructions to replies
  2101. //try to save the state of the check box
  2102. if (UrCommentWithCommentRecenter.checked) {
  2103. localStorage.setItem('WithCommentRecenter', 'yes');
  2104. //alert(" WithCommentRecenter yes");
  2105. } else {
  2106. localStorage.setItem('WithCommentRecenter', 'no');
  2107. //alert("WithCommentRecenter no");
  2108. }
  2109.  
  2110. };
  2111.  
  2112. URComments.AutoSwitchToURCommentsTab = function() {
  2113. // AutoSwitchToURCommentsTab
  2114. //try to save the state of the check box
  2115. if (UrCommentAutoSwitchToURCommentsTab.checked) {
  2116. localStorage.setItem('AutoSwitchToURCommentsTab', 'yes');
  2117. //alert("yes");
  2118. } else {
  2119. localStorage.setItem('AutoSwitchToURCommentsTab', 'no');
  2120. //alert("no");
  2121. }
  2122. };
  2123.  
  2124. //UrCommentDBLClk7DCAutoSend
  2125. URComments.DBLClk7DCAutoSend = function() {
  2126. if (UrCommentDBLClk7DCAutoSend.checked) {
  2127. //save the selection
  2128. localStorage.setItem('DBLClk7DCAutoSend', 'yes');
  2129.  
  2130. $('#URCommentAutoClickURStatus').prop('checked', true);
  2131. localStorage.setItem('AutoClickURStatus', 'yes');
  2132.  
  2133. } else {
  2134. localStorage.setItem('DBLClk7DCAutoSend', 'no');
  2135. }
  2136.  
  2137. //clear the html from the tabs
  2138. $("#sidepanel-Comments").html('');
  2139. //reload the content
  2140. ChangeLanguage = true;
  2141.  
  2142. //setTimeout(URComments_bootstrap, 20);
  2143. URComments_bootstrap();
  2144.  
  2145. };
  2146.  
  2147. //UrCommentDBLClkAll
  2148. URComments.DBLClkAll = function() {
  2149. if (UrCommentDBLClkAll.checked) {
  2150. localStorage.setItem('DBLClkAll', 'yes');
  2151.  
  2152. $('#URCommentAutoClickURStatus').prop('checked', true);
  2153. localStorage.setItem('AutoClickURStatus', 'yes');
  2154. } else {
  2155. localStorage.setItem('DBLClkAll', 'no');
  2156. }
  2157.  
  2158. //clear the html from the tabs
  2159. $("#sidepanel-Comments").html('');
  2160. //reload the content
  2161. ChangeLanguage = true;
  2162.  
  2163. //setTimeout(URComments_bootstrap, 20);
  2164. URComments_bootstrap();
  2165. };
  2166.  
  2167. ///////////////////////////////////////////////////////////////////////
  2168. //////
  2169. ////// UR Comment functions
  2170. //////
  2171. ///////////////////////////////////////////////////////////////////////
  2172.  
  2173. URComments.escapeHtml = function(a) {
  2174. a = a.replace(/&/g, "&amp;");
  2175. a = a.replace(/</g, "&lt;");
  2176. a = a.replace(/>/g, "&gt;");
  2177. a = a.replace(/"/g, "&quot;");
  2178. a = a.replace(/'/g, "&#039;");
  2179. return a;
  2180. };
  2181.  
  2182. //$( "#update-request-panel .solution p").html()
  2183. URComments.StringSwap = function(a) {
  2184.  
  2185. if ($("#update-request-panel .solution p").length > 0) {
  2186. a = a.replace("$URD", $("#update-request-panel .solution p").html());
  2187. //remove stupid waze spaces
  2188. //a = $(".new-comment-text").val()
  2189. a = a.replace(/ /g, "");
  2190. a = a.replace(/ /g, "");
  2191. a = a.replace(/(\r\n|\n)/gm, "");
  2192. } else if ($(".description .content").length > 0) {
  2193. a = a.replace("$URD", $(".description .content").html());
  2194. a = a.replace(/ /g, "");
  2195. a = a.replace(/ /g, "");
  2196. a = a.replace(/(\r\n|\n)/gm, "");
  2197. } else if (a.indexOf("$URD") >= 0) {
  2198. a = "";
  2199. }
  2200.  
  2201. //selected segments
  2202. var streetName = "";
  2203. if (W.selectionManager.selectedItems.length >= 1 && W.selectionManager.selectedItems.length <= 2) {
  2204. for (var i = 0; i < W.selectionManager.selectedItems.length; i++) {
  2205. if (W.selectionManager.selectedItems[i].model.CLASS_NAME == "Waze.Feature.Vector.Segment") {
  2206. var primaryStreetID = W.selectionManager.selectedItems[i].model.attributes.primaryStreetID;
  2207. if (i == 0) {
  2208. streetName = W.model.streets.objects[primaryStreetID].name;
  2209. } else {
  2210. streetName = "the intersection of " + streetName + " and " + W.model.streets.objects[primaryStreetID].name;
  2211. }
  2212. }
  2213. }
  2214. console.log(streetName);
  2215. a = a.replace("$SELSEGS", streetName);
  2216. }
  2217. return a;
  2218. };
  2219.  
  2220. //gets the total number of comments on a ur
  2221. TotalNumberOfComments = function(urID) {
  2222. urcToConsole("reporterComments");
  2223. return ($(wazeModel.updateRequestSessions.objects[urID].comments).length);
  2224. };
  2225.  
  2226. //sorry URO if i was going to use you to sort Urs i needed to use the same dates you do! Thanks! ;)
  2227. URComments.uroGetCommentAge = function(commentObj) {
  2228. if (commentObj.createdOn === null) return -1;
  2229. return URComments.uroDateToDays(commentObj.createdOn);
  2230. };
  2231.  
  2232. URComments.uroDateToDays = function(dateToConvert) {
  2233. var dateNow = new Date();
  2234. var elapsedSinceEpoch = dateNow.getTime();
  2235. var elapsedSinceEvent = elapsedSinceEpoch - dateToConvert;
  2236. dateNow.setHours(0);
  2237. dateNow.setMinutes(0);
  2238. dateNow.setSeconds(0);
  2239. dateNow.setMilliseconds(0);
  2240. var elapsedSinceMidnight = elapsedSinceEpoch - dateNow.getTime();
  2241. if (elapsedSinceEvent < elapsedSinceMidnight) {
  2242. // event occurred today...
  2243. return 0;
  2244. } else {
  2245. // event occurred at some point prior to midnight this morning, so return a minimum value of 1...
  2246. return 1 + Math.floor((elapsedSinceEvent - elapsedSinceMidnight) / 86400000);
  2247. }
  2248. };
  2249.  
  2250. URComments.onScreen = function(obj) {
  2251.  
  2252. //geometry was removed from Waze.model.mapUpdateRequests.objects[id]
  2253. //but can be found in Waze.model.mapUpdateRequests.objects[id].geometry
  2254.  
  2255. if (obj.geometry) {
  2256. return (Waze.map.getExtent().intersectsBounds(obj.geometry.getBounds()));
  2257. }
  2258. return false;
  2259. };
  2260.  
  2261. URComments.URCLoadUpdateRequestsEvents = function() {
  2262. /*
  2263. W.model.mapUpdateRequests.events.register("objectschanged", null, uroFilterURs_onObjectsChanged);
  2264. W.model.mapUpdateRequests.events.register("objectsadded", null, uroFilterURs_onObjectsAdded);
  2265. W.model.mapUpdateRequests.events.register("objectsremoved", null, uroFilterURs_onObjectsRemoved);
  2266.  
  2267. W.model.updateRequestSessions.events.register("objectschanged", null, uroUREvent_onObjectsChanged);
  2268. W.model.updateRequestSessions.events.register("objectsadded", null, uroUREvent_onObjectsAdded);
  2269. W.model.updateRequestSessions.events.register("objectsremoved", null, uroUREvent_onObjectsRemoved);
  2270. */
  2271.  
  2272. window.HideUR = "stopped";
  2273. W.model.mapUpdateRequests.events.register("objectschanged", null, URComments.urcUREvent_onObjectsAdded('mapUpdateRequests objectschanged')); //needed
  2274. // W.model.mapUpdateRequests.events.register("objectsadded", null, URComments.urcUREvent_onObjectsAdded('mapUpdateRequests objectsadded')); //this one triggers for ever ur added to the db
  2275. //W.model.mapUpdateRequests.events.register("objectsremoved", null, URComments.urcUREvent_onObjectsAdded('mapUpdateRequests objectsremoved'));
  2276. //W.model.updateRequestSessions.events.register("objectsremoved", null, URComments.urcUREvent_onObjectsAdded('updateRequestSessions objectsremoved'));
  2277.  
  2278.  
  2279. //W.model.updateRequestSessions.events.register("objectschanged", null, URComments.urcUREvent_onObjectsAdded('updateRequestSessions objectschanged')); // this launches every time a UR is opened
  2280. W.model.updateRequestSessions.events.register("objectsadded", null, URComments.urcUREvent_onObjectsAdded('updateRequestSessions objectsadded')); //needed
  2281.  
  2282.  
  2283. W.map.events.register("moveend", null, URComments.urcUREvent_onObjectsAdded('moveend')); //needed
  2284. W.map.events.register("zoomend", null, URComments.urcUREvent_onObjectsAdded('zoomend')); //needed
  2285. //W.map.events.register("mouseup", null, URComments.urcUREvent_onObjectsAdded('mouseup'));
  2286.  
  2287. //urcToConsole("UR events added");
  2288.  
  2289. //setTimeout(URComments.urcUREvent_onObjectsAdded('pageload'), 1000);
  2290. setTimeout(URComments.urcUREvent_onObjectsAdded('pageload'), 50);
  2291. };
  2292.  
  2293.  
  2294. URComments.urcUREvent_onObjectsAdded = function(a) {
  2295. return function() {
  2296.  
  2297. //check if filtering or the pill count are enabled other wise abort this function
  2298. //URCommentsFilterEnabled URCommentsPillEnabled
  2299. if (URCommentsFilterEnabled.checked === false && URCommentsPillEnabled.checked === false && URCommentsAutoSendMyReminders.checked === false) {
  2300. urcToConsole(URC_USER_PROMPT[5]); //"aborting FilterURs2 becasue both filtering, counts, and auto reminders are disabled"
  2301. return;
  2302. }
  2303.  
  2304. urcToConsole("urcUREvent_onObjectsAdded " + a + " " + window.HideUR);
  2305.  
  2306. if (a == "timedout" && window.HideUR == "running") { //|| a === "list is empty retry"){
  2307. window.HideUR = "stopped";
  2308. a = "timedout";
  2309. URComments.ShowWMEMessage(URC_USER_PROMPT[6], 5000); //"URComments: Loading UR data has timed out, retrying."
  2310. }
  2311.  
  2312. if (window.HideUR === "stopped" && a !== "timedout") {
  2313. clearTimeout(window.buffertedtimeout);
  2314. clearTimeout(window.buffertedtimeout2);
  2315.  
  2316. urcToConsole("set time-out to filter UR and time-out check " + a + " " + window.HideUR);
  2317.  
  2318. //certain events need to be launched a bit later then others
  2319. if (a == "moveend" || a == "zoomend") {
  2320. window.buffertedtimeout = setTimeout(URComments.FilterURs(a), 2000);
  2321. } else {
  2322. window.buffertedtimeout = setTimeout(URComments.FilterURs(a), 500);
  2323. }
  2324.  
  2325. window.HideUR = "running";
  2326. window.BufferFillterURCommand = false;
  2327. window.buffertedtimeout2 = setTimeout(URComments.urcUREvent_onObjectsAdded("timedout"), 30000);
  2328. } else {
  2329. urcToConsole("aborted: " + a + " " + window.HideUR);
  2330. }
  2331.  
  2332. };
  2333. };
  2334.  
  2335. URComments.FilterURs = function(a, b) {
  2336. return function() {
  2337.  
  2338. urcToConsole("Start Filtering URs - " + a);
  2339. for (var i = 0; i < W.map.layers.length; i++) {
  2340. if (W.map.layers[i].uniqueName == 'update_requests') window.uroURLayerIdx = i;
  2341. //if(W.map.layers[i].uniqueName == 'problems') uroProblemLayerIdx = i;
  2342. //if(W.map.layers[i].name == 'Spotlight') uroMaskLayer = i;
  2343. //if(W.map.layers[i].uniqueName == 'speed_cameras') uroCamLayer = i;
  2344. //if(W.map.layers[i].name.indexOf('Waze.Control.SelectHighlightFeature') !== -1) uroRootContainer = W.map.layers[i].div.id;
  2345. //if(W.map.layers[i].uniqueName == 'area_managers') uroAMLayerIdx = i;
  2346. //if(W.map.layers[i].uniqueName == 'landmarks') uroPlacesRoot = W.map.layers[i].id + '_vroot';
  2347. //if(W.map.layers[i].name == 'Node Connections') uroTurnsLayerIdx = i;
  2348. }
  2349.  
  2350. var CloseDays = $('#CloseDays').val();
  2351. //check that all visible urs are loaded
  2352. var idList = [];
  2353. var allID = "";
  2354. var PushNeededCount = 0;
  2355.  
  2356. for (var urID in W.model.mapUpdateRequests.objects) {
  2357.  
  2358. if (W.model.updateRequestSessions.objects[urID] == null) {
  2359. idList.push(urID);
  2360. PushNeededCount = PushNeededCount + 1;
  2361. }
  2362.  
  2363. if (PushNeededCount > 500) {
  2364. //urcToConsole('trash grabbing updateRequestSessions with IDs ' + idList);
  2365. W.model.updateRequestSessions.get(idList);
  2366. idList = [];
  2367. PushNeededCount = 0;
  2368. urcToConsole('over 1k ur');
  2369. }
  2370. }
  2371.  
  2372. if (idList.length > 0) {
  2373. //urcToConsole('trash grabbing updateRequestSessions with IDs ' + idList);
  2374. W.model.updateRequestSessions.get(idList);
  2375. }
  2376.  
  2377. //abort filtering URs if the list is empty
  2378. if (Object.keys(W.model.updateRequestSessions.objects).length === 0) {
  2379. window.HideUR = "stopped";
  2380. urcToConsole("no Ur in active sessions");
  2381. setTimeout(URComments.urcUREvent_onObjectsAdded("list is empty retry"), 5000);
  2382. return;
  2383. }
  2384.  
  2385. var urdescription = "";
  2386. var EditorID = Waze.model.loginManager.user.id; //editor's id number
  2387. var ReminderReload = false;
  2388. var TotalVisibleURCount = 0;
  2389. var CountOfIdInList = 0;
  2390. var DelayTimeoutCountOfIdInList = 0;
  2391.  
  2392. for (var id1 in W.model.mapUpdateRequests.objects) {
  2393. TotalVisibleURCount = TotalVisibleURCount + 1;
  2394. if (URComments.onScreen(W.model.mapUpdateRequests.objects[id1])) {
  2395. allID = allID + id1 + ",";
  2396. CountOfIdInList = CountOfIdInList + 1;
  2397. }
  2398.  
  2399. if (CountOfIdInList >= 500) {
  2400. urcToConsole("reached 500 UR requesting list: " + DelayTimeoutCountOfIdInList);
  2401. //play with putting a timeout between each group requested
  2402. setTimeout(URComments.FilterURs2(a, allID, TotalVisibleURCount), DelayTimeoutCountOfIdInList);
  2403.  
  2404. CountOfIdInList = 0;
  2405. allID = "";
  2406. DelayTimeoutCountOfIdInList = DelayTimeoutCountOfIdInList + 1000;
  2407. }
  2408. }
  2409.  
  2410. urcToConsole("reached end of UR list requesting list: " + DelayTimeoutCountOfIdInList);
  2411. $("#URCount").html(TotalVisibleURCount);
  2412. setTimeout(URComments.FilterURs2(a, allID, TotalVisibleURCount), 0);
  2413. };
  2414. };
  2415.  
  2416.  
  2417. URComments.FilterURs2 = function(a, allID, TotalVisibleURCount) {
  2418. return function() {
  2419. urcToConsole("FilterURs2 TotalVisibleURCount: " + TotalVisibleURCount);
  2420.  
  2421. var CloseDays = ($('#CloseDays').val() * 1);
  2422. var ReminderDays = ($('#ReminderDays').val() * 1);
  2423. var ClosePlussReminderDays = CloseDays + ReminderDays;
  2424. var urdescription = "";
  2425. var EditorID = Waze.model.loginManager.user.id; //editor's id number
  2426. var ReminderReload = false;
  2427. var LoggedInEditor = Waze.model.loginManager.user.userName;
  2428. var openingUR;
  2429. r = require("Waze/Feature/Vector/ProblemResolution");
  2430.  
  2431. if (allID !== "") {
  2432. //this is the link that works but I think it is grabbing a cached version of the page var urSessionURL = 'https://www.waze.com/2tes-live/app/MapProblems/UpdateRequests?ids=' + allID;
  2433.  
  2434. //https://www.waze.com/Descartes-live/app/MapProblems/UpdateRequests?ids=4284449
  2435.  
  2436. if (Waze.Config.api_base === "/Descartes-beta/app") {
  2437. var urSessionURL = 'https://editor-beta.waze.com/Descartes-beta/app/MapProblems/UpdateRequests?ids=' + allID + "&time=" + (new Date()).getTime();
  2438. } else if (Waze.Config.api_base === "/Descartes-live/app") {
  2439. var urSessionURL = 'https://www.waze.com/Descartes-live/app/MapProblems/UpdateRequests?ids=' + allID + "&time=" + (new Date()).getTime();
  2440. } else if (Waze.Config.api_base === "/row-Descartes-live/app") {
  2441. var urSessionURL = 'https://www.waze.com/row-Descartes-live/app/MapProblems/UpdateRequests?ids=' + allID + "&time=" + (new Date()).getTime();
  2442. } else if (Waze.Config.api_base === "/il-Descartes-live/app") {
  2443. var urSessionURL = 'https://www.waze.com/il-Descartes-live/app/MapProblems/UpdateRequests?ids=' + allID + "&time=" + (new Date()).getTime();
  2444. }
  2445.  
  2446. urcToConsole("urSessionURL: " + a + " " + urSessionURL);
  2447.  
  2448. // https://www.waze.com/Descartes-live/app/MapProblems/UpdateRequests?ids=3678676
  2449. var LastCommentorUserID = "0";
  2450.  
  2451. //urcToConsole("trash36");
  2452. $.ajax({
  2453. dataType: "json",
  2454. //dataType: 'jsonp',
  2455. url: urSessionURL,
  2456.  
  2457. success: function(json) {
  2458. try {
  2459.  
  2460. for (jsnObj = 0; jsnObj < $(json.updateRequestSessions.objects).length; jsnObj++) {
  2461. var urDetail = json.updateRequestSessions.objects[jsnObj];
  2462. var id = urDetail.id;
  2463. var skip = false;
  2464. var urStyle = 'shown';
  2465. var i = 0;
  2466. var Marked = "";
  2467. var UrcURType = "";
  2468. var urdescription = W.model.mapUpdateRequests.objects[id].attributes.description;
  2469.  
  2470. if (urDetail.comments.length === 0) {
  2471. var InitialurType = Waze.model.mapUpdateRequests.objects[id].attributes.type;
  2472. }
  2473. var NumberOfComments = urDetail.comments.length;
  2474. var CountsBGColor = "#FFFF99"; //light yellow
  2475.  
  2476. if (NumberOfComments > 0) {
  2477. var reporterResponse = false;
  2478. var lastCommentDateTime = 0;
  2479. var LastComment = "";
  2480.  
  2481. for (i = 0; i < urDetail.comments.length; i++) {
  2482. if (urDetail.comments[i].userID == -1) {
  2483. reporterResponse = true;
  2484. }
  2485. lastCommentDateTime = urDetail.comments[i].createdOn;
  2486. LastCommentorUserID = urDetail.comments[i].userID;
  2487. LastComment = urDetail.comments[i].text;
  2488. //only white if logged in editor has the last editor comment
  2489. if (LastCommentorUserID > 1) {
  2490. if (LastCommentorUserID === EditorID) {
  2491. CountsBGColor = "white";
  2492. } else {
  2493. CountsBGColor = "#FFFF99"; //light yellow
  2494. }
  2495. }
  2496.  
  2497. var Commenttext = urDetail.comments[i].text;
  2498. //urcToConsole(Commenttext + " " + id);
  2499. if (Commenttext.indexOf("NOTE]") >= 0 || Commenttext.indexOf("ROADWORKS]") >= 0 || Commenttext.indexOf("CONSTRUCTION]") >= 0 || Commenttext.indexOf("CLOSURE]") >= 0 || Commenttext.indexOf("EVENT]") >= 0 || Commenttext.indexOf(LoggedInEditor) >= 0) {
  2500. //urcToConsole("skipped1 URO+ tagged in comments urid: " + id + "with comment text " + Commenttext);
  2501. skip = true;
  2502. }
  2503.  
  2504. if (Commenttext.indexOf(LoggedInEditor) >= 0 && URCommentsReplaceTagWithEditorName.checked === true) {
  2505. Marked = LoggedInEditor;
  2506. } else if (Commenttext.indexOf("NOTE]") >= 0) {
  2507. Marked = "Note";
  2508. } else if (Commenttext.indexOf("ROADWORKS]") >= 0) {
  2509. Marked = "Roadworks";
  2510. } else if (Commenttext.indexOf("CONSTRUCTION]") >= 0) {
  2511. Marked = "Construction";
  2512. } else if (Commenttext.indexOf("CLOSURE]") >= 0) {
  2513. Marked = "Closure";
  2514. } else if (Commenttext.indexOf("EVENT]") >= 0) {
  2515. Marked = "Event";
  2516. }
  2517. //urcToConsole("Marked " + Marked);
  2518.  
  2519. }
  2520.  
  2521. //if (LastCommentorUserID === EditorID) {
  2522. // CountsBGColor = "white";
  2523. //}
  2524.  
  2525. //urcToConsole("LastComment: " + LastComment + " " + id);
  2526. }
  2527.  
  2528. var lastCommentAge = URComments.uroDateToDays(lastCommentDateTime);
  2529. //urcToConsole('Responder: reporter response for ' + id + ' = ' + reporterResponse + ', last comment on ' + lastCommentDateTime + ', comment age in days = ' + lastCommentAge + ' number of comments = ' + i);
  2530.  
  2531. //urdescription = W.model.mapUpdateRequests.objects[id].attributes.description;
  2532. //urcToConsole("urdescription: " + urdescription + " " + id);
  2533.  
  2534. if (urdescription) {
  2535. //urcToConsole("urdescription present: " + urdescription + " " + id);
  2536. //skip tagged URs
  2537. if (urdescription.indexOf("NOTE]") >= 0 || urdescription.indexOf("ROADWORKS]") >= 0 || urdescription.indexOf("CONSTRUCTION]") >= 0 || urdescription.indexOf("CLOSURE]") >= 0 || urdescription.indexOf("EVENT]") >= 0 || urdescription.indexOf(LoggedInEditor) >= 0) {
  2538. //urcToConsole("skipped2 URO+ tagged in description urid: " + id + "with comment text " + urdescription);
  2539. skip = true;
  2540. }
  2541.  
  2542. if (urdescription.indexOf(LoggedInEditor) >= 0 && URCommentsReplaceTagWithEditorName.checked === true) {
  2543. Marked = LoggedInEditor;
  2544. } else if (urdescription.indexOf("NOTE]") >= 0) {
  2545. Marked = "Note";
  2546. } else if (urdescription.indexOf("ROADWORKS]") >= 0) {
  2547. Marked = "Roadworks";
  2548. } else if (urdescription.indexOf("CONSTRUCTION]") >= 0) {
  2549. Marked = "Construction";
  2550. } else if (urdescription.indexOf("CLOSURE]") >= 0) {
  2551. Marked = "Closure";
  2552. } else if (urdescription.indexOf("EVENT]") >= 0) {
  2553. Marked = "Event";
  2554. }
  2555.  
  2556. if (URCommentsHideWithDescript.checked == true && NumberOfComments <= 0) {
  2557. UrcURType = "WithDescription";
  2558. //urcToConsole("UrcURType WithDescription: " + id);
  2559. }
  2560. //urcToConsole("skipped2 tagged in description urid: " + id + "with comment text " + Commenttext);
  2561. } else {
  2562. if (URCommentsHideWithoutDescript.checked == true && NumberOfComments <= 0) {
  2563. UrcURType = "WithoutDescription";
  2564. //urcToConsole("UrcURType WithoutDescription: " + id);
  2565. }
  2566. }
  2567.  
  2568. if (W.model.mapUpdateRequests.objects[id].attributes.open === false) {
  2569. skip = true;
  2570. // UrcURType = "IsClosed";
  2571.  
  2572. }
  2573.  
  2574. //urcToConsole("just before skipping, skip is " + skip + " " + id);
  2575. //Waze.model.mapUpdateRequests.objects[id].type == "mapUpdateRequest"
  2576. if (skip === false && W.model.mapUpdateRequests.objects[id].type == "mapUpdateRequest") {
  2577.  
  2578. // && URComments.onScreen(Waze.model.mapUpdateRequests.objects[id])
  2579.  
  2580. if (NumberOfComments > 0) {
  2581.  
  2582. //4 day UR if there is only one comment, if the comment is less or equal to the editors setting, and if the last comment was not made by the driver
  2583. if (NumberOfComments === 1 && ReminderDays > 0 && lastCommentAge >= ReminderDays && LastCommentorUserID > 1) {
  2584. urcToConsole("URComments2 - 4day URID: " + id);
  2585. //direct link to a UR https://www.waze.com/editor/?zoom=5&lat=41.586201000000024&lon=-88.060863&layers=1957&mapUpdateRequest=4048801
  2586.  
  2587. if (URCommentsHideReminderNeeded.checked == true) {
  2588. UrcURType = "NeedsReminder";
  2589. }
  2590.  
  2591. if (LastCommentorUserID === EditorID && URCommentsAutoSendMyReminders.checked == true && $('[data-id="' + id + '"]').hasClass('ReminderSent') === false && EditorID > 0) {
  2592. urcToConsole("reminder needed UR: " + LastComment + " " + id);
  2593.  
  2594. Waze.model.updateRequestSessions.objects[id].addComment(URCommentsArray[ReminderPosistion + 1]);
  2595.  
  2596. //toggleFollowConversation true or false
  2597. if ($("#URCommentURUnfollow").is(":checked")) {
  2598. setTimeout(URComments.toggleFollowConversation(id), 0);
  2599. }
  2600.  
  2601. URComments.ShowWMEMessage(URC_USER_PROMPT[7] + id, 2500); //"URComments: Adding reminder message to UR: "
  2602.  
  2603. //attempting to stop double reminders from being sent by adding a class that we can check for before sending the reminder
  2604. $('[data-id="' + id + '"]').addClass('ReminderSent');
  2605.  
  2606. //set to hide if hide in between states is checked
  2607. if (URCommentsHideInbetween.checked == true) {
  2608. UrcURType = "InBetweenStates";
  2609. }
  2610.  
  2611. }
  2612.  
  2613.  
  2614. //7 day if the number of comments are greater than or equal to 1, days past are more then 7, the last comment was not from the driver, and number of comments are less than 2
  2615.  
  2616. } else if ((NumberOfComments >= 2 && lastCommentAge >= CloseDays && LastCommentorUserID > 1) || (NumberOfComments >= 1 && ReminderDays == 0 && lastCommentAge >= CloseDays && LastCommentorUserID > 1)) {
  2617. //urcToConsole("close needed UR: " + LastComment + " " + id);
  2618.  
  2619. //hide or show UR that need closing
  2620. if (URCommentsHideCloseNeeded.checked == true && UrcURType === "") {
  2621. UrcURType = "NeedsClose";
  2622. }
  2623.  
  2624. } else if (LastCommentorUserID > 0) {
  2625. //in between states waiting for replies or time to elapse
  2626. //urcToConsole("hiding ur 2: " + id);
  2627. if (URCommentsHideInbetween.checked == true) {
  2628. UrcURType = "InBetweenStates";
  2629. }
  2630. }
  2631.  
  2632. //last comment was a user reply; change the pin color to blue or peach
  2633. if (LastCommentorUserID < 1) {
  2634. if (CountsBGColor == "white") {
  2635. CountsBGColor = "#79B5C7"; //light blue
  2636. } else {
  2637. CountsBGColor = "#FFCC99"; //peach
  2638. }
  2639.  
  2640. if (URCommentsHideReplies.checked == true) {
  2641. UrcURType = "HasUserReplies";
  2642. }
  2643.  
  2644. } else if (lastCommentAge > ClosePlussReminderDays && CountsBGColor !== "white") {
  2645. CountsBGColor = "#FF8B8B"; //light red
  2646. }
  2647.  
  2648. //yellow at close days workaround
  2649. //urcToConsole("yellow at close days workaround " + CountsBGColor + " NumberOfComments: " +NumberOfComments + "lastCommentAge: " +lastCommentAge + " CloseDays" + CloseDays + " LastCommentorUserID: " + LastCommentorUserID + "urid: " + id);
  2650. //alert("yellow at close days workaround " + CountsBGColor + " NumberOfComments: " +NumberOfComments + "lastCommentAge: " +lastCommentAge + " CloseDays" + CloseDays + " ReminderDays: " + ReminderDays + " LastCommentorUserID: " + LastCommentorUserID + "urid: " + id);
  2651.  
  2652. if (CountsBGColor == "#FFFF99" && NumberOfComments >= 1 && lastCommentAge >= ClosePlussReminderDays && LastCommentorUserID > 1) {
  2653. CountsBGColor = "#FF8B8B"; //light red
  2654. }
  2655. /*
  2656. if (CountsBGColor == "#FFFF99") {
  2657. if (ReminderDays === 0 && NumberOfComments >= 1 && lastCommentAge >= CloseDays && LastCommentorUserID > 1) {
  2658. CountsBGColor = "#FF8B8B"; //light red
  2659. } else if (ReminderDays > 0 && NumberOfComments >= 1 && lastCommentAge >= CloseDays && LastCommentorUserID > 1) {
  2660. CountsBGColor = "#CC00FF"; //light red
  2661. }
  2662. }
  2663. */
  2664.  
  2665.  
  2666.  
  2667.  
  2668. }
  2669. //zero comments
  2670. } else {
  2671. urcToConsole("skipped UR: " + id);
  2672. }
  2673. //skipped
  2674. //urcToConsole("check for urcounts class; comment count " + i );
  2675. //urcToConsole("trash58");
  2676.  
  2677. if (lastCommentAge === undefined) {
  2678. lastCommentAge = "?";
  2679. }
  2680.  
  2681. var Message = "";
  2682.  
  2683. if (Marked !== "") {
  2684. Message = Marked + " " + i + "c";
  2685. CountsBGColor = "#CCCCCC"; //light grey
  2686. } else {
  2687. Message = i + "c " + lastCommentAge + "d";
  2688. }
  2689.  
  2690. //urcToConsole("message " + Message);
  2691. //urcToConsole("Marked " + Marked);
  2692.  
  2693.  
  2694. //if the ur is tagged or has more than 0 comments reorder the ur stacking
  2695. if (Marked !== "" || i > 0) {
  2696.  
  2697. var MessageOffset = Message.length;
  2698. if (MessageOffset < 10) {
  2699. MessageOffset = MessageOffset * 1.4;
  2700. } else {
  2701. MessageOffset = MessageOffset * 2.3;
  2702. }
  2703. MessageOffset = "-" + MessageOffset + "px";
  2704. //urcToConsole("message " + Message);
  2705. if (CountsBGColor == "#CCCCCC") { //light grey
  2706. $('[data-id="' + id + '"]').css({
  2707. 'z-index': '999'
  2708. });
  2709. } else if (CountsBGColor == "white" || CountsBGColor == "#79B5C7") {
  2710. $('[data-id="' + id + '"]').css({
  2711. 'z-index': '998'
  2712. });
  2713. //).style.visibility
  2714. } else if (CountsBGColor == "#FF8B8B") { //light red
  2715. $('[data-id="' + id + '"]').css({
  2716. 'z-index': '997'
  2717. });
  2718. }
  2719. if (URCommentsPillEnabled.checked === true) {
  2720. //add URC bubble
  2721. if ($('[data-id="' + id + '"] .URCounts').hasClass('URCounts') === false) {
  2722. $('[data-id="' + id + '"]').append($("<div>").css("clear", "both")
  2723. .css("margin-bottom", "10px")
  2724.  
  2725. .append($("<div>").html(Message)
  2726. .css("color", "black")
  2727. .css("background", CountsBGColor)
  2728. .css("position", "absolute")
  2729. .css("top", "30px")
  2730. .css("right", MessageOffset)
  2731.  
  2732. .css("display", "block")
  2733. .css("width", "auto")
  2734. .css("white-space", "nowrap")
  2735. .css("padding-left", "5px")
  2736. .css("padding-right", "5px")
  2737.  
  2738. .css("border", "1px solid")
  2739. .css("border-radius", "25px")
  2740.  
  2741. .addClass('URCounts')
  2742. )
  2743. );
  2744.  
  2745. } else {
  2746. $('[data-id="' + id + '"] .URCounts').html(Message);
  2747. $('[data-id="' + id + '"] .URCounts').css("background", CountsBGColor);
  2748. $('[data-id="' + id + '"] .URCounts').css("right", MessageOffset);
  2749. }
  2750.  
  2751. //end of URC bubble
  2752. }
  2753. }
  2754.  
  2755.  
  2756. //console.log(a);
  2757.  
  2758. //URC UR Filtering
  2759.  
  2760. var uroURFiltersActive = false; // var used to keep track if we actually need to show / hide the UR pins
  2761.  
  2762. if (sessionStorage.UROverview_hasActiveURFilters == undefined) {
  2763. //condsole.log("old version of URO, need to use existing UI-parsing test...");
  2764.  
  2765. //these are all of the tags that URO uses to filter URs. If any of the settings are enabled set a var to let URO do the filterenabled
  2766. if ($("#_cbFilterWazeAuto").is(":checked") || $("#_cbFilterIncorrectTurn").is(":checked") || $("#_cbFilterIncorrectAddress").is(":checked") || $("#_cbFilterIncorrectRoute").is(":checked") || $("#_cbFilterMissingRoundabout").is(":checked") || $("#_cbFilterGeneralError").is(":checked") || $("#_cbFilterTurnNotAllowed").is(":checked") || $("#_cbFilterIncorrectJunction").is(":checked") || $("#_cbFilterMissingBridgeOverpass").is(":checked") || $("#_cbFilterWrongDrivingDirection").is(":checked") || $("#_cbFilterMissingExit").is(":checked") || $("#_cbFilterMissingRoad").is(":checked") || $("#_cbFilterBlockedRoad").is(":checked") || $("#_cbFilterMissingLandmark").is(":checked") || $("#_cbFilterUndefined").is(":checked") || $("#_cbFilterRoadworks").is(":checked") || $("#_cbFilterConstruction").is(":checked") || $("#_cbFilterClosure").is(":checked") || $("#_cbFilterEvent").is(":checked") || $("#_cbFilterNote").is(":checked") || $("#_cbInvertURFilter").is(":checked") || $("#_cbFilterOpenUR").is(":checked") || $("#_cbFilterClosedUR").is(":checked") || $("#_cbFilterSolved").is(":checked") || $("#_cbFilterUnidentified").is(":checked") || $("#_cbEnableMinAgeFilter").is(":checked") || $("#_cbEnableMaxAgeFilter").is(":checked") || $("#_cbURDescriptionMustBePresent").is(":checked") || $("#_cbURDescriptionMustBeAbsent").is(":checked") || $("#_cbEnableKeywordMustBePresent").is(":checked") || $("#_cbEnableKeywordMustBeAbsent").is(":checked") || $("#_cbCaseInsensitive").is(":checked") || $("#_cbHideMyComments").is(":checked") || $("#_cbHideAnyComments").is(":checked") || $("#_cbHideIfLastCommenter").is(":checked") || $("#_cbHideIfNotLastCommenter").is(":checked") || $("#_cbHideIfReporterLastCommenter").is(":checked") || $("#_cbHideIfReporterNotLastCommenter").is(":checked") || $("#_cbEnableMinCommentsFilter").is(":checked") || $("#_cbEnableMaxCommentsFilter").is(":checked") || $("#_cbHideMyFollowed").is(":checked") || $("#_cbHideMyUnfollowed").is(":checked") || $("#_cbEnableCommentAgeFilter2").is(":checked") || $("#_cbEnableCommentAgeFilter").is(":checked") || $("#_cbURUserIDFilter").is(":checked") || $("#_cbURResolverIDFilter").is(":checked")) {
  2767. uroURFiltersActive = true; //at least one of URO's UR checkboxes were enabledPlugin
  2768. }
  2769. } else if (sessionStorage.UROverview_hasActiveURFilters == "true") {
  2770. //console.log("new version of URO is actively filtering UR markers...");
  2771. uroURFiltersActive = true; //twisters URO active filter bit is set to true
  2772. }
  2773.  
  2774.  
  2775. if (uroURFiltersActive === true && URCommentsFilterEnabled.checked === true) {
  2776. URComments.ShowWMEMessage(URC_USER_PROMPT[8], 5000); //"URComment's UR Filtering has been disabled because URO\'s UR filters are active."
  2777. $('#URCommentsFilterEnabled').prop('checked', false);
  2778. }
  2779.  
  2780. if (URCommentsFilterEnabled.checked == true && uroURFiltersActive === false) {
  2781. //check if we should hide URO stype tagged UR
  2782. if (URCommentsHideNotes.checked == true && Marked !== "") {
  2783. UrcURType = "IsTagged";
  2784. } else if (Marked !== "" && UrcURType !== "IsClosed") {
  2785. UrcURType = "1";
  2786. }
  2787.  
  2788. //check if not "my" ur
  2789. //if(URCommentsHideNotMyUR.checked == true && NumberOfComments > 0 && lastCommentAge <= CloseDays ){
  2790. if (URCommentsHideNotMyUR.checked == true && NumberOfComments > 0) {
  2791. //light red, peach, light yellow
  2792. //if(CountsBGColor == "#FF8B8B" || CountsBGColor == "#FFCC99" || CountsBGColor == "#FFFF99"){
  2793. if (CountsBGColor == "#FFCC99" || CountsBGColor == "#FFFF99" || CountsBGColor == "#FF8B8B") {
  2794. UrcURType = "NotMyUR";
  2795. }
  2796. }
  2797. //URCommentsShowPastClose
  2798. //check if not "my" ur
  2799. if (URCommentsShowPastClose.checked == true && NumberOfComments > 0 && lastCommentAge > ClosePlussReminderDays) {
  2800. //light red, peach, light yellow
  2801. //if(CountsBGColor == "#FF8B8B" || CountsBGColor == "#FFCC99" || CountsBGColor == "#FFFF99"){
  2802. if (CountsBGColor == "#FFCC99" || CountsBGColor == "#FFFF99" || CountsBGColor == "#FF8B8B") {
  2803. UrcURType = "2";
  2804. }
  2805. }
  2806.  
  2807. //initial UR no comments
  2808. if (urDetail.comments.length === 0 && URCommentsHideInital.checked == true) {
  2809. UrcURType = "initial";
  2810. }
  2811.  
  2812.  
  2813. //urcToConsole('UrcURType: ' + UrcURType);
  2814.  
  2815. //show or hide URs|| NumberOfComments > 3 || NumberOfComments < 3
  2816.  
  2817. if (W.model.mapUpdateRequests.objects[id].attributes.open === false) {
  2818. if (URCommentsHideClosed.checked == true) {
  2819. UrcURType = "IsClosed";
  2820. } else {
  2821. UrcURType = "ClosedNotHiden";
  2822. }
  2823. }
  2824. if (UrcURType == "IsTagged") { //|| NumberOfComments > 2
  2825. //urcToConsole('UR is tagged and set to be hidden');
  2826. urStyle = 'hidden';
  2827.  
  2828. } else if (UrcURType == "InBetweenStates" || UrcURType == "NeedsReminder" || UrcURType == "NeedsClose" || UrcURType == "initial" || UrcURType == "HasUserReplies" || UrcURType == "IsClosed" || UrcURType == "NotMyUR" || UrcURType == "WithoutDescription" || UrcURType == "WithDescription") {
  2829. urStyle = 'hidden';
  2830. } else {
  2831. urStyle = 'visible';
  2832. }
  2833. //W.map.layers[uroURLayerIdx].markers[id].icon.imageDiv.style.visibility = urStyle;
  2834. $('[data-id="' + id + '"]').css("visibility", urStyle);
  2835. //urcToConsole('next ur ' + id);
  2836.  
  2837. //when filtering is disable and URO filters are disabled reshow all the UR
  2838. } else if (URCommentsFilterEnabled.checked == false && uroURFiltersActive === false) {
  2839. //urcToConsole('UR filtering is disabled showing all ur ' + id);
  2840. urStyle = 'visible';
  2841. // W.map.layers[uroURLayerIdx].markers[id].icon.imageDiv.style.visibility = urStyle;
  2842. $('[data-id="' + id + '"]').css("visibility", urStyle);
  2843. }
  2844.  
  2845.  
  2846. }
  2847. window.HideUR = "stopped";
  2848. //urcToConsole('rem done filtering UR, Total UR: ' + TotalVisibleURCount);
  2849.  
  2850. //URComments.ShowWMEMessage("URComments: Machete808Count: " + window.Machete808Count,600000);
  2851. //alert(CountsBGColor);
  2852.  
  2853. } catch (e) {
  2854.  
  2855. setTimeout(URComments.FilterURs('error retry'), 1000);
  2856. urcToConsole('Responder: error obtaining UR response = ' + e);
  2857. //window.HideUR = "stopped";
  2858. }
  2859. }
  2860. });
  2861. urcToConsole("" + a + " total visible: " + TotalVisibleURCount); // + " allID " + allID);
  2862. //window.HideUR = "stopped";
  2863.  
  2864. } else {
  2865. //urcToConsole("no UR aborting");
  2866. window.HideUR = "stopped";
  2867. }
  2868.  
  2869. };
  2870. };
  2871.  
  2872. URComments.OpenNextUR = function(message, delay) {
  2873. return function() {
  2874. setTimeout(URComments.OpenNextUR(a, allID, TotalVisibleURCount), 0);
  2875.  
  2876. };
  2877. };
  2878.  
  2879. URComments.ShowWMEMessage = function(message, delay) {
  2880. //if ($("#URCMapNote").length <= 0){
  2881. var dateNow = new Date();
  2882. TrickRemove = dateNow.getTime();
  2883.  
  2884. //var message = "URComments UR Filtering has been disabled because URO\'s UR filters are active.";
  2885. //var message = "URComments: Can not find the comment box! In order for this script to work you need to have a user request open."
  2886. //var message = "URComments: Adding reminder message to UR: 4239896"
  2887. //delay = 10000;
  2888. var width = message.length * 10;
  2889. var c = '<div id="URCMapNote' + TrickRemove + '" style="width: ' + width + 'px; font-size: 15px; font-weight: bold; margin-left: auto; margin-right: auto; background-color: orange;"><center><b>' + message + '</b></center></div>';
  2890. $("#toolbar").append(c);
  2891. $("#URCMapNote" + TrickRemove).show().delay(delay).queue(function(n) {
  2892. $(this).remove();
  2893. n();
  2894. });
  2895. //}
  2896. };
  2897.  
  2898.  
  2899.  
  2900. /*
  2901. CountsBGColor = "#FFFF99"; //light yellow = UR that are waiting for the last editor but still has time before the Close days setting ex 7 days
  2902. CountsBGColor = "#CCCCCC"; //light grey = URO styled notes ex [NOTE]
  2903. CountsBGColor = "#FFCC99"; //peach = another editor before the close days has gone by has user reply
  2904. CountsBGColor = "#FF8B8B"; //light red = past the close days setting and is now able to be taken over by another editor
  2905. CountsBGColor = "white"; = UR that "belong to the editor logged in that need work
  2906. CountsBGColor = "#79B5C7"; //light blue = UR that "belong to the editor logged in that have user replies
  2907.  
  2908.  
  2909. White = The editor logged in has comments on the UR and the UR needs work
  2910. light blue = The editor logged in has comments on the UR and the UR's last comment was a user reply
  2911. light red = past the close days setting and is now able to be taken over by another editor
  2912.  
  2913. light yellow = UR that are waiting for the another editor to send a reminder or to be closed but still has time before the Close days setting (ex 7 days)
  2914. peach = UR that another editor had commented on but the last comment is a user reply
  2915.  
  2916. light grey = URO styled notes ex [NOTE]
  2917.  
  2918. */
  2919.  
  2920.  
  2921.  
  2922. //save what comment list is selected and then reload the page
  2923. URComments.BoilerPlateCreatorsFunction = function() {
  2924. if (BoilerPlateCreators.value !== "---User's Lists---") {
  2925. //save the selection
  2926. localStorage.setItem('BoilerPlateCreators', BoilerPlateCreators.value);
  2927.  
  2928. //clear the html from the tabs
  2929. $("#sidepanel-Comments").html('');
  2930. //reload the content
  2931. ChangeLanguage = true;
  2932.  
  2933. //setTimeout(URComments_bootstrap, 20);
  2934. URComments_bootstrap();
  2935. } else {
  2936. $("#BoilerPlateCreators").val(localStorage.getItem('BoilerPlateCreators'));
  2937. }
  2938. };
  2939.  
  2940.  
  2941. URComments.URCommentZoomOutcheck = function(Title, URStatus) {
  2942. return function() {
  2943. urcToConsole("zoom out URCommentZoomOutcheck");
  2944.  
  2945. //this is the new place for zooming out and will still be happening while the comment is sending
  2946. //zoom out option - if the user option is set to reload map after posting a comment reply
  2947. if (UrCommentZoomOutAfterComment.checked === true) {
  2948. urcToConsole("zoom out ZoomOutAfterComment enabled");
  2949. setTimeout(URComments.SetZoomCloseUR(ReturnToCurrentZoom, "LeaveOpen"), 0);
  2950. } else {
  2951. //alert("autozoomout not checked");
  2952. }
  2953. setTimeout(URComments.URCommentSendBtnClicked(Title, URStatus), 20);
  2954. };
  2955. };
  2956.  
  2957. URComments.URCommentSendBtnClicked = function(Title, URStatus) {
  2958.  
  2959. //waze is weird and after clicking send button the close button had to be refound, which takes a few seconds for the new close button to be drawn
  2960. // so we wait 1500 milliseconds before looking for the close button
  2961. //since we are passing vars to the next function we have to pass this to handler function so it doesn't happen on click
  2962.  
  2963. //the above is still true but what i have found is that it sometimes takes a while from clicking send to the comment actually posting. there was time when i closed the comment before it actually posted and it would have to be redone. so added a check and a timeout and recheck if the textarea isn't empty. afterwards we can re-grab and click the close button
  2964. return function() {
  2965. //grab the close button to compare to later
  2966. CloseButtonHolder = $(".problem-panel-navigation button.close-button");
  2967.  
  2968. //check to see if the comments went through before saving or closing the comment
  2969. if ($(".new-comment-text").val() !== "" && $(".new-comment-text").val() !== undefined) {
  2970. urcToConsole('the send button was clicked, Waiting for the comment to send. ' + PauseCount);
  2971. urcToConsole("current comment = " + $(".new-comment-text").val());
  2972. urcToConsole("current comment = ");
  2973. PauseCount++;
  2974. setTimeout(URComments.URCommentSendBtnClicked(Title, URStatus), 20);
  2975. } else {
  2976. urcToConsole('The comment went through, jumping to CloseDelayHack2');
  2977. PauseCount = "1";
  2978.  
  2979. //check if we want to unfollow
  2980. if ($("#URCommentURUnfollow").is(":checked") && $("#follow-on").is(":checked")) {
  2981. //$('#follow-on').trigger('click');
  2982. //setTimeout(URComments.URCommentSendBtnClicked(Title, URStatus), 20);
  2983. var urID = $(".update-requests .selected").data("id");
  2984. //urcToConsole("toggleFollowConversation id " + urID);
  2985. //Waze.model.updateRequestSessions.objects[urID].toggleFollowConversation('false');
  2986. setTimeout(URComments.toggleFollowConversation(urID), 500);
  2987. }
  2988. //delay this command for uro not to freakout on refreshing uro bubble ur count
  2989. setTimeout(URComments.CloseDelayHack2(Title, URStatus), 100);
  2990.  
  2991. }
  2992. };
  2993. };
  2994.  
  2995.  
  2996. URComments.toggleFollowConversation = function(urID) {
  2997. return function() {
  2998. urcToConsole("toggleFollowConversation id " + urID);
  2999. Waze.model.updateRequestSessions.objects[urID].toggleFollowConversation('false');
  3000. };
  3001. };
  3002.  
  3003.  
  3004. //this checks to see if the Waze's save button is waiting to be clicked.
  3005. //currently unused
  3006. URComments.WazeSaveWaiting = function() {
  3007. if ($(".WazeControlSave").hasClass('ItemInactive')) {
  3008. return true;
  3009. } else {
  3010. return false;
  3011. }
  3012. };
  3013.  
  3014. URComments.CloseDelayHack2 = function(Title, URStatus) {
  3015. return function() {
  3016. urcToConsole("CloseDelayhack2 " + Title + " " + URStatus);
  3017.  
  3018. PauseCount = "1";
  3019. urcToConsole("New close button");
  3020. //wrap the code in the finding of the new close button
  3021.  
  3022. //now that we found the new close button and send was clicked
  3023.  
  3024. //lets check if we should click close or save
  3025. //when clicking save you dint need to click close
  3026.  
  3027. //this checks to see if the Waze's save button is waiting to be clicked.
  3028. //URComments.WazeSaveWaiting()
  3029.  
  3030. if (URStatus.toLowerCase() === "solved" || URStatus.toLowerCase() === "notidentified") {
  3031. urcToConsole("CloseDelayhack2 Solved or NotIdentified- Clicking Save");
  3032. //this clicks the waze save btn
  3033. if (URCommentAutoClickURStatus.checked === true && UrCommentSaveAfterComment.checked === true) {
  3034. //click save
  3035. $('#toolbar #edit-buttons .WazeControlSave').trigger('click');
  3036. } else if (UrCommentAutoCloseComment.checked) {
  3037. $(".problem-panel-navigation button.close-button").trigger('click');
  3038. }
  3039.  
  3040. } else {
  3041. //when not saving you have to click close.
  3042. urcToConsole("CloseDelayhack2 since we are not saving click the close button");
  3043. if (UrCommentAutoCloseComment.checked) {
  3044. urcToConsole("CloseDelayhack2 auto close option checked");
  3045.  
  3046.  
  3047. //normal editor
  3048. if ($(".problem-panel-navigation button.close-button").length !== 0) {
  3049. urcToConsole("zoom out CloseDelayHack2 normal editor");
  3050. $(".problem-panel-navigation button.close-button").trigger('click');
  3051. }
  3052.  
  3053. //beta editor
  3054. if ($(".problem-edit .header .close-panel").length !== 0) {
  3055. urcToConsole("zoom out CloseDelayHack2 beta editor");
  3056. $(".problem-edit .header .close-panel").trigger('click');
  3057. //setTimeout(function() {
  3058. // $('a .close-popover').trigger('click');
  3059. // }, 2000);
  3060. }
  3061.  
  3062. //since saving above reloads the map we need this reload only to happen when we dont click save
  3063. //auto reload map for non save urs
  3064. //if (UrCommentAutoReloadAfterComment.checked) {
  3065. // setTimeout(URComments.AutoReloadMapOnComment, 500);
  3066. //}
  3067. }
  3068. }
  3069.  
  3070. urcToConsole("end of saving or closing comment");
  3071. //}
  3072.  
  3073. //this is the new place for zooming out and will still be happening while the comment is sending
  3074. //zoom out option - if the user option is set to reload map after posting a comment reply
  3075. if (UrCommentZoomOutAfterComment.checked === true) {
  3076. urcToConsole("zoom out CloseDelayHack2");
  3077. setTimeout(URComments.SetZoomCloseUR(ReturnToCurrentZoom, "LeaveOpen"), 0);
  3078. } else {
  3079. //alert("autozoomout not checked");
  3080. }
  3081.  
  3082. setTimeout(URComments.urcUREvent_onObjectsAdded('URCommentsReload'), 0);
  3083.  
  3084. };
  3085. };
  3086.  
  3087. URComments.SetZoomCloseUR = function(a, b) {
  3088. //this sets the map zoom; 0 is all the way out; 10 is all the way in but next to useless (the map and sat views disappear);
  3089. //the closest zoom that shows the sat and map is zoom 9
  3090. return function() {
  3091. urcToConsole("Setting map zoom to: " + a + " with flag: " + b);
  3092. //alert(a + " " + b);
  3093. Waze.map.setCenter(Waze.map.getCenter(), a);
  3094. //close ur if zooming out to
  3095. if (b === "CloseUR") {
  3096. //alert(b);
  3097.  
  3098. //normal editor
  3099. /* if ($(".problem-panel-navigation button.close-button").length !== 0) {
  3100. $(".problem-panel-navigation button.close-button").trigger('click');
  3101. }
  3102. */
  3103. //beta editor
  3104. if ($(".problem-edit .header .close-panel").length !== 0) {
  3105. $(".problem-edit .header .close-panel").trigger('click');
  3106. // setTimeout(function() {
  3107. // $('a .close-popover').trigger('click');
  3108. // }, 2000);
  3109. }
  3110. }
  3111. };
  3112. };
  3113.  
  3114. URComments.AutoReloadMapOnComment = function() {
  3115. //waze together with URO is buggy i have to close the comment window before reloading the map or the pin ends up getting stuck on for all URO filters and it takes a page reload to fix it.
  3116. // to get URO to rescan urs that have been commented on you have to reload the map this also causes URO to hide the ones that no longer fit the current URO filters like when using my pre-sets
  3117.  
  3118. //click the reload button for the map
  3119. $(".controls-container .reload-button").trigger('click');
  3120. };
  3121.  
  3122. URComments.ConfirmToConsole = function() {
  3123. //over ride the default action of the standard confirm by writing confirm to a new function nconfirm, making a 'fake' confirm and then restoring confirm by copying the nconfirm back over confirm!
  3124. nconfirm = unsafeWindow.confirm;
  3125. unsafeWindow.confirm = function(msg) {
  3126. //if ((I18n.translations[I18n.locale].update_requests.panel.confirm == msg) && (uroGetCBChecked('_cbDisablePendingQuestions') == true)) {
  3127. urcToConsole('URComment confirm redirected to console: ' + msg);
  3128. return true;
  3129. };
  3130. };
  3131.  
  3132. URComments.RestoreConfirmToConfirm = function() {
  3133. //restore the normal action of confirm by writing nconfirm to back over confirm, so the site is able to send user messages outside of my script!
  3134. unsafeWindow.confirm = nconfirm;
  3135. };
  3136.  
  3137. URComments.AutoZoomIN = function(Title, Comment, URStatus, urID, AutoSendComment) {
  3138. return function() {
  3139. urcToConsole("AutoZoomIN");
  3140. var URCommentsUnsavedDetected = false;
  3141. var URCommentsUnsaveCount = $(".WazeControlSave .counter").html();
  3142.  
  3143. //detect unsaved changed if there are and the auto save option is on abort adding comments to the UR
  3144. if (URCommentsUnsaveCount > 0 && $("#UrCommentSaveAfterComment").is(":checked") && URStatus.toLowerCase() !== "open") {
  3145. URCommentsUnsavedDetected = true;
  3146. alert(URC_USER_PROMPT[9]); //"UrComments has detected that you have unsaved changes!\n\nWith the Auto Save option enabled and with unsaved changes you cannot send comments that would require the script to save. Please save your changes and then re-click the comment you wish to send."
  3147. }
  3148. //URCommentsUnsavedDetected = true;
  3149.  
  3150. //get urid for manually clicked comments
  3151. if (urID === 0 || urID === "" || urID === undefined) {
  3152. urID = $(".update-requests .selected").data("id");
  3153. }
  3154.  
  3155. //check to see if the auto zoom in option in enabled if it is start the zooming in process
  3156. urcToConsole("AutoZoomIN checking if we should zoom in based of if the Title is the same as the reminder title: " + Title + " pointer title: " + URCommentsArray[ReminderPosistion] + " urID: " + urID);
  3157. //having OneOrTheOTher first is a hack to make the logic work
  3158. var OneOrTheOTher = "no";
  3159.  
  3160. if (UrCommentNewZoomIn.checked === true && Title !== URCommentsArray[ReminderPosistion] && Title !== URCommentsArray[CloseNotIdentifiedPosistion] && AutoSendComment !== "AutoSendComment") {
  3161. OneOrTheOTher = "yes";
  3162. }
  3163.  
  3164. //alert(OneOrTheOTher);
  3165. if (OneOrTheOTher === "yes" && URCommentsUnsavedDetected === false) {
  3166.  
  3167. urcToConsole("AutoZoomIN zooming to location");
  3168.  
  3169. //predefined zoom threshold for auto zoom
  3170. var zoom = 4;
  3171.  
  3172. //do not zoom back out if we are already zoomed in and just happen to be re-clicking on a UR.
  3173. //or we have the map set good for a 4-day reminder
  3174. var WazeCurrentZoom = URComments.GetWazeMapZoomLevel();
  3175.  
  3176. if (WazeCurrentZoom < zoom) {
  3177. URComments.gotoURById(urID, 5);
  3178. }
  3179.  
  3180. //setTimeout(URComments.AutoZoomIN2(Title, Comment, URStatus), 2500);
  3181. setTimeout(URComments.PostURComment(Title, Comment, URStatus, AutoSendComment, urID), 1);
  3182.  
  3183. } else if (URCommentsUnsavedDetected === false) {
  3184.  
  3185. //auto zoom in is disabled jump to postURComment
  3186. //alert("else");
  3187. urcToConsole("AutoZoomIN disabled to PostURComment id - " + urID);
  3188. //we have to use set timeout here because we need the return function() in PostURComment
  3189. //for when we are zooming in and out for the reminder
  3190. //since we are not zooming here jump rigth to PostURComment
  3191. setTimeout(URComments.PostURComment(Title, Comment, URStatus, AutoSendComment, urID), 1);
  3192. }
  3193.  
  3194. };
  3195. };
  3196.  
  3197. URComments.gotoURById = function(urID, zoom) {
  3198. //alert(urID);
  3199. //$('span[id="WME_AutoUR_Count"]').html((WMEAutoUR.Auto.index+1)+"/"+WMEAutoUR.Auto.UR_len);
  3200.  
  3201. //save zoom so we can return this the current zoom level
  3202. ReturnToCurrentZoom = URComments.GetWazeMapZoomLevel();
  3203.  
  3204. var x = Waze.model.mapUpdateRequests.objects[urID].attributes.geometry.x;
  3205. var y = Waze.model.mapUpdateRequests.objects[urID].attributes.geometry.y;
  3206.  
  3207. urcToConsole("gotoURById: " + "x: " + x + "y: " + y + "zoom: " + zoom);
  3208.  
  3209. Waze.map.setCenter([x, y], zoom);
  3210. return;
  3211. };
  3212.  
  3213. URComments.GetWazeMapZoomLevel = function(Title, Comment, URStatus) {
  3214. zoom = W.map.mapState.mapLocation.zoom;
  3215. urcToConsole("Current Zoom: " + zoom);
  3216. return zoom;
  3217. };
  3218.  
  3219.  
  3220. URComments.WaitForURtoOpen = function(Title, Comment, URStatus, urID, AutoSendComment) {
  3221. return function() {
  3222. if ($(".new-comment-text")[0]) {
  3223. setTimeout(URComments.AutoZoomIN(Title, Comment, URStatus, urID, AutoSendComment), 500);
  3224. } else {
  3225. setTimeout(URComments.WaitForURtoOpen(Title, Comment, URStatus, urID, AutoSendComment), 200);
  3226. }
  3227. };
  3228. };
  3229.  
  3230.  
  3231. URComments.PostURComment = function(Title, Comment, URStatus, AutoSendComment, urID) {
  3232. // the user clicked on a comment link
  3233. return function() {
  3234. //Swap out special text
  3235. Comment = URComments.StringSwap(Comment);
  3236. urcToConsole("attaching to send button " + Title + " - " + Comment + " - " + URStatus);
  3237.  
  3238. //add event listener that runs most of the options = URCommentZoomOutcheck
  3239. $('.new-comment-form .new-comment-text + .btn-default').click(URComments.URCommentZoomOutcheck(Title, URStatus));
  3240.  
  3241. //check if the comment text area is present if not alert the user to open a UR
  3242. if ($(".new-comment-text")[0]) {
  3243. urcToConsole('found comment box ' + Title + ' - ' + Comment);
  3244. $(".new-comment-text").val(Comment);
  3245. //click the Ur status
  3246. setTimeout(URComments.CheckIfClickStatus(URStatus, AutoSendComment), 1);
  3247. } else {
  3248. //we were unable to find an open UR
  3249. URComments.ShowWMEMessage(URC_USER_PROMPT[10], 5000); //"URComments: Can not find the comment box! In order for this script to work you need to have a user request open."
  3250. }
  3251. };
  3252. };
  3253.  
  3254. //this is part of the script that gets the maps position for the 4 day reminder map link
  3255. getQueryString = function(link, name) {
  3256. var pos = link.indexOf(name + '=') + name.length + 1;
  3257. var len = link.substr(pos).indexOf('&');
  3258. if (-1 == len) len = link.substr(pos).length;
  3259. return link.substr(pos, len);
  3260. };
  3261.  
  3262. URComments.CheckIfClickStatus = function(URStatus, AutoSendComment) {
  3263. return function() {
  3264. urcToConsole("checking ur status function: " + URStatus + " " + AutoSendComment);
  3265.  
  3266. if (URCommentAutoClickURStatus.checked === true) {
  3267. //bypass the confirm function so other site messages do not come up!
  3268. URComments.ConfirmToConsole();
  3269.  
  3270. //click the ur status options (Not identified solved, open)
  3271. if ($("#state-open").length !== 0) {
  3272. $(".problem-edit .body").scrollTop($(".problem-edit .body")[0].scrollHeight);
  3273. if (URStatus.toLowerCase() == "notidentified") {
  3274. //click Not identified
  3275. $("#state-not-identified").trigger('click');
  3276. } else if (URStatus.toLowerCase() == "solved") {
  3277. //click solved
  3278. $("#state-solved").trigger('click');
  3279. } else {
  3280. //click back on open just encase the wrong reply was clicked previously
  3281. $("#state-open").trigger('click');
  3282. }
  3283. }
  3284.  
  3285. //restores confirm function so other site messages come up!
  3286. URComments.RestoreConfirmToConfirm();
  3287. //wait for the status to change
  3288. }
  3289.  
  3290. if (AutoSendComment === "AutoSendComment") {
  3291. setTimeout(URComments.URVerfiyStatusSet(URStatus, AutoSendComment), 1);
  3292. }
  3293. };
  3294. };
  3295.  
  3296. URComments.URVerfiyStatusSet = function(URStatus, AutoSendComment) {
  3297. return function() {
  3298. urcToConsole("URVerfiyStatusSet function: " + URStatus + " " + AutoSendComment);
  3299. var URStatusOk = true;
  3300.  
  3301. if (URCommentAutoClickURStatus.checked === true) {
  3302.  
  3303. if (URStatus.toLowerCase() == "notidentified") {
  3304. //click Not identified
  3305. if ($("#state-not-identified").is(":checked") == false) {
  3306. URStatusOk = false;
  3307. }
  3308. } else if (URStatus.toLowerCase() == "solved") {
  3309. //click solved
  3310. if ($("#state-solved").is(":checked") == false) {
  3311. URStatusOk = false;
  3312. }
  3313. } else {
  3314. //click back on open just encase the wrong reply was clicked previously
  3315. if ($("#state-open").is(":checked") == false) {
  3316. URStatusOk = false;
  3317. }
  3318. }
  3319.  
  3320. }
  3321.  
  3322. if (URStatusOk == true) {
  3323.  
  3324. setTimeout(URComments.AutoClickSend(URStatus, AutoSendComment), 1);
  3325. } else {
  3326. urcToConsole("UR Status has yet to change waiting 250ms");
  3327. setTimeout(URComments.URVerfiyStatusSet(URStatus, AutoSendComment), 150);
  3328. }
  3329.  
  3330. };
  3331. };
  3332.  
  3333. URComments.AutoClickSend = function(URStatus, AutoSendComment) {
  3334. return function() {
  3335. urcToConsole("checking if we are auto clicking the send button");
  3336. if (AutoSendComment === "AutoSendComment") {
  3337. urcToConsole("Auto clicking the send button");
  3338. $('.new-comment-form .new-comment-text + .btn-default').trigger('click');
  3339. }
  3340. };
  3341. };
  3342.  
  3343. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3344. ////
  3345. //// on start-up keep checking the site to see if the me tab is loaded
  3346. ////
  3347. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3348.  
  3349. URComments.startcode = function() {
  3350. // Check if WME is loaded, if not, waiting a moment and checks again. if yes init URComments
  3351. try {
  3352. //look for the me tab instead if the buggy chat room!
  3353. var element = $("#user-details");
  3354. urcToConsole("Found user-details window");
  3355. if (typeof element !== "undefined" && element.value !== '') {
  3356. //urcToConsole("Test2");
  3357. URComments.init();
  3358. //urcToConsole("Test3");
  3359. } else {
  3360. setTimeout(URComments.startcode, 2000);
  3361. }
  3362. } catch (err) {
  3363. urcToConsole(err);
  3364. if (err === "TypeError: element is null" || err === "TypeError: element is null") {
  3365. setTimeout(URComments.startcode, 2000);
  3366. }
  3367. setTimeout(URComments.startcode, 2000);
  3368. }
  3369. };
  3370.  
  3371.  
  3372. /*
  3373. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3374. //// URO Preset Filters
  3375. ////
  3376. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3377.  
  3378. //URO+ these are the tags of all of the items URO uses to filter URs
  3379. URComments.UROCheckboxesArray = ["_cbFilterWazeAuto",
  3380. "_cbFilterIncorrectTurn", //
  3381. "_cbFilterIncorrectAddress", //
  3382. "_cbFilterIncorrectRoute", //
  3383. "_cbFilterMissingRoundabout", //
  3384. "_cbFilterGeneralError", //
  3385. "_cbFilterTurnNotAllowed", //
  3386. "_cbFilterIncorrectJunction", //
  3387. "_cbFilterMissingBridgeOverpass", //
  3388. "_cbFilterWrongDrivingDirection", //
  3389. "_cbFilterMissingExit", //
  3390. "_cbFilterMissingRoad", //
  3391. "_cbFilterBlockedRoad", //
  3392. "_cbFilterMissingLandmark", //
  3393. "_cbFilterUndefined", //
  3394. //"_cbFilterCryosphere", //
  3395. "_cbFilterRoadworks", //
  3396. "_cbFilterConstruction", //
  3397. "_cbFilterClosure", //
  3398. "_cbFilterEvent", //
  3399. "_cbFilterNote", //
  3400. "_cbInvertURFilter", //
  3401. "_cbFilterOpenUR", //
  3402. "_cbFilterClosedUR", //
  3403. "_cbFilterSolved", //
  3404. "_cbFilterUnidentified", //
  3405. "_cbEnableMinAgeFilter", //
  3406. "_cbEnableMaxAgeFilter", //
  3407. "_cbURDescriptionMustBePresent", //
  3408. "_cbURDescriptionMustBeAbsent", //
  3409. "_cbEnableKeywordMustBePresent", //
  3410. "_cbEnableKeywordMustBeAbsent", //
  3411. "_cbCaseInsensitive", //
  3412. "_cbHideMyComments", //
  3413. "_cbHideAnyComments", //
  3414. "_cbHideIfLastCommenter", //
  3415. "_cbHideIfNotLastCommenter", //
  3416. "_cbHideIfReporterLastCommenter", //
  3417. "_cbHideIfReporterNotLastCommenter", //
  3418. "_cbEnableMinCommentsFilter", //
  3419. "_cbEnableMaxCommentsFilter", //
  3420. "_cbHideMyFollowed", //
  3421. "_cbHideMyUnfollowed", //
  3422. "_cbEnableCommentAgeFilter2", //
  3423. "_cbEnableCommentAgeFilter", //
  3424. "_cbNoFilterForTaggedURs", //
  3425. "_cbURUserIDFilter", //Without comments from user
  3426. "_cbURResolverIDFilter" //Not resolved by user
  3427. ];
  3428.  
  3429. URComments.UROPresetHighlight = function(a) {
  3430. if (a === "URONewNoDescription") {
  3431. $('#URONewNoDescription').css('background-color', '#FFFF66');
  3432. $('#URCommentURONEW').css('background-color', '');
  3433. $('#URCommentURO4DayFollowUp').css('background-color', '');
  3434. $('#URCommentURO7Day').css('background-color', '');
  3435. $('#URCommentURO8Day').css('background-color', '');
  3436. $('#URCommentURO10Day').css('background-color', '');
  3437. $('#URCommentURO24Hr').css('background-color', '');
  3438. }
  3439.  
  3440. if (a === "UroShowNew") {
  3441. $('#URONewNoDescription').css('background-color', '');
  3442. $('#URCommentURONEW').css('background-color', '#FFFF66');
  3443. $('#URCommentURO4DayFollowUp').css('background-color', '');
  3444. $('#URCommentURO7Day').css('background-color', '');
  3445. $('#URCommentURO8Day').css('background-color', '');
  3446. $('#URCommentURO10Day').css('background-color', '');
  3447. $('#URCommentURO24Hr').css('background-color', '');
  3448. }
  3449. if (a === "URO4DayFollowUp") {
  3450. $('#URONewNoDescription').css('background-color', '');
  3451. $('#URCommentURONEW').css('background-color', '');
  3452. $('#URCommentURO4DayFollowUp').css('background-color', '#FFFF66');
  3453. $('#URCommentURO7Day').css('background-color', '');
  3454. $('#URCommentURO8Day').css('background-color', '');
  3455. $('#URCommentURO10Day').css('background-color', '');
  3456. $('#URCommentURO24Hr').css('background-color', '');
  3457. }
  3458. if (a === "URO7Day") {
  3459. $('#URONewNoDescription').css('background-color', '');
  3460. $('#URCommentURONEW').css('background-color', '');
  3461. $('#URCommentURO4DayFollowUp').css('background-color', '');
  3462. $('#URCommentURO7Day').css('background-color', '#FFFF66');
  3463. $('#URCommentURO8Day').css('background-color', '');
  3464. $('#URCommentURO10Day').css('background-color', '');
  3465. $('#URCommentURO24Hr').css('background-color', '');
  3466. }
  3467. if (a === "URO8Day") {
  3468. $('#URONewNoDescription').css('background-color', '');
  3469. $('#URCommentURONEW').css('background-color', '');
  3470. $('#URCommentURO4DayFollowUp').css('background-color', '');
  3471. $('#URCommentURO7Day').css('background-color', '');
  3472. $('#URCommentURO8Day').css('background-color', '#FFFF66');
  3473. $('#URCommentURO10Day').css('background-color', '');
  3474. $('#URCommentURO24Hr').css('background-color', '');
  3475. }
  3476. if (a === "URO10Day") {
  3477. $('#URONewNoDescription').css('background-color', '');
  3478. $('#URCommentURONEW').css('background-color', '');
  3479. $('#URCommentURO4DayFollowUp').css('background-color', '');
  3480. $('#URCommentURO7Day').css('background-color', '');
  3481. $('#URCommentURO8Day').css('background-color', '');
  3482. $('#URCommentURO10Day').css('background-color', '#FFFF66');
  3483. $('#URCommentURO24Hr').css('background-color', '');
  3484. }
  3485. if (a === "URO24Hr") {
  3486. $('#URONewNoDescription').css('background-color', '');
  3487. $('#URCommentURONEW').css('background-color', '');
  3488. $('#URCommentURO4DayFollowUp').css('background-color', '');
  3489. $('#URCommentURO7Day').css('background-color', '');
  3490. $('#URCommentURO8Day').css('background-color', '');
  3491. $('#URCommentURO10Day').css('background-color', '');
  3492. $('#URCommentURO24Hr').css('background-color', '#FFFF66');
  3493. }
  3494. if (a === "UROclearUROFiltrs") {
  3495. $('#URONewNoDescription').css('background-color', '');
  3496. $('#URCommentURONEW').css('background-color', '');
  3497. $('#URCommentURO4DayFollowUp').css('background-color', '');
  3498. $('#URCommentURO7Day').css('background-color', '');
  3499. $('#URCommentURO8Day').css('background-color', '');
  3500. $('#URCommentURO10Day').css('background-color', '');
  3501. $('#URCommentURO24Hr').css('background-color', '');
  3502. }
  3503.  
  3504. };
  3505.  
  3506. URComments.UROClearClicked = function(a) {
  3507. return function() {
  3508. URComments.UROPresetHighlight(a);
  3509.  
  3510. //save the current preset so we can reaply the highlighting on startup
  3511. localStorage.setItem('UROCurrentPeset', a);
  3512.  
  3513. if ($("#sidepanel-uroverview").length) {
  3514. //alert("test");
  3515. urcToConsole("URO clear");
  3516. //this is the array used to store the URO id tags
  3517.  
  3518. //go over the array and clear all of the URO+ check boxes
  3519. for (var URComments_URO_Index = 0; URComments_URO_Index < URComments.UROCheckboxesArray.length; URComments_URO_Index = URComments_URO_Index + 1) {
  3520.  
  3521. if ($('#' + URComments.UROCheckboxesArray[URComments_URO_Index]).length <= 0) {
  3522. alert("there was an error finding URO's tag " + URComments.UROCheckboxesArray[URComments_URO_Index]);
  3523. return false;
  3524. }
  3525.  
  3526. if ($('#' + URComments.UROCheckboxesArray[URComments_URO_Index]).is(":checked")) {
  3527. //clicks the checkbox by if the checkbox is checked
  3528. $('#' + URComments.UROCheckboxesArray[URComments_URO_Index]).trigger('click');
  3529. } else {
  3530. //click check box if checkbox in unchecked
  3531. //$(document.getElementById(URComments.UROCheckboxesArray[ URComments_URO_Index ])).trigger('click');
  3532. }
  3533. }
  3534.  
  3535. // make it so uro+ doesnt filter tagged urs [NOTE]...
  3536. $('#_cbNoFilterForTaggedURs').trigger('click');
  3537. if (a === "UroShowNew") {
  3538. urcToConsole("URO show new");
  3539. //If last comment made by UR reporter? chose no
  3540. $('#_cbHideIfReporterNotLastCommenter').trigger('click');
  3541. }
  3542. if (a === "URONewNoDescription") {
  3543. //only show no user description
  3544. $('#_cbURDescriptionMustBeAbsent').trigger('click');
  3545.  
  3546. //hide reporter did not leave the last comment
  3547. $('#_cbHideIfReporterNotLastCommenter').trigger('click');
  3548.  
  3549. //Hide With more than 1 comments
  3550. $('#_cbEnableMaxCommentsFilter').trigger('click');
  3551. $('#_inputFilterMaxComments').val(1);
  3552. }
  3553. if (a === "URO4DayFollowUp") {
  3554. urcToConsole("URO 4 day");
  3555.  
  3556. //hide With less than 1 comments
  3557. $('#_inputFilterMinComments').val(1);
  3558. $('#_cbEnableMinCommentsFilter').trigger('click');
  3559.  
  3560. //Hide With more than 1 comments
  3561. $('#_inputFilterMaxComments').val(1);
  3562. $('#_cbEnableMaxCommentsFilter').trigger('click');
  3563.  
  3564. //Hide Last comment less than 4 days ago
  3565. $('#_inputFilterCommentDays2').val(4);
  3566. $('#_cbEnableCommentAgeFilter2').trigger('click');
  3567.  
  3568. }
  3569. if (a === "URO7Day") {
  3570. urcToConsole("URO 7 day");
  3571.  
  3572. //hide With less than 1 comments
  3573. $('#_inputFilterMinComments').val(1); //1
  3574. $('#_cbEnableMinCommentsFilter').trigger('click');
  3575.  
  3576. //hide Last comment less than 7 days ago
  3577. $('#_inputFilterCommentDays2').val(7);//7
  3578. $('#_cbEnableCommentAgeFilter2').trigger('click');
  3579.  
  3580. //hide If last comment made by UR reporter?
  3581. $('#_cbHideIfReporterLastCommenter').trigger('click');
  3582. }
  3583. if (a === "URO8Day") {
  3584. urcToConsole("URO 7 day");
  3585.  
  3586. //hide With less than 1 comments
  3587. $('#_inputFilterMinComments').val(1); //1
  3588. $('#_cbEnableMinCommentsFilter').trigger('click');
  3589.  
  3590. //hide Last comment less than 8 days ago
  3591. $('#_inputFilterCommentDays2').val(8);//8
  3592. $('#_cbEnableCommentAgeFilter2').trigger('click');
  3593.  
  3594. //hide If last comment made by UR reporter?
  3595. $('#_cbHideIfReporterLastCommenter').trigger('click');
  3596. }
  3597. if (a === "URO10Day") {
  3598. urcToConsole("URO 10 day");
  3599.  
  3600. //hide With less than 1 comments
  3601. $('#_inputFilterMinComments').val(1); //1
  3602. $('#_cbEnableMinCommentsFilter').trigger('click');
  3603.  
  3604. //hide Last comment less than 8 days ago
  3605. $('#_inputFilterCommentDays2').val(10);//10
  3606. $('#_cbEnableCommentAgeFilter2').trigger('click');
  3607.  
  3608. //hide If last comment made by UR reporter?
  3609. $('#_cbHideIfReporterLastCommenter').trigger('click');
  3610. }
  3611. if (a === "URO24Hr") {
  3612.  
  3613. //alanoftheberg
  3614.  
  3615. //check "Hide URs less than days old" "8" days old
  3616. $('#_inputFilterMinDays').val(8);//8
  3617. $('#_cbEnableMinAgeFilter').trigger('click');
  3618.  
  3619.  
  3620. //check "yes" on "If last comment made by UR reporter?"
  3621. $('#_cbHideIfReporterLastCommenter').trigger('click');
  3622.  
  3623. //check "With less than" and put in "1" comments
  3624. $('#_inputFilterMinComments').val(1);//1
  3625. $('#_cbEnableMinCommentsFilter').trigger('click');
  3626.  
  3627. //check "Last comment more than" "1" days ago
  3628. $('#_inputFilterCommentDays').val(1);//1
  3629. $('#_cbEnableCommentAgeFilter').trigger('click');
  3630.  
  3631. }
  3632. if (a === "UROclearUROFiltrs") {}
  3633.  
  3634. //shared URO settings except clear
  3635. if (a !== "UROclearUROFiltrs") {
  3636. $('#_cbFilterUnidentified').trigger('click');
  3637. }
  3638.  
  3639. } else {
  3640. alert("UR Overview Plus (URO+) needs to be installed to use these URO Presets.");
  3641. }
  3642. };
  3643. };
  3644. */
  3645.  
  3646. URComments.startcode();
  3647. }
  3648. //URComments_bootstrap();
  3649. setTimeout(URComments_bootstrap, 3000);