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+!

  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.9.6
  8. // @match https://editor-beta.waze.com/*editor*
  9. // @match https://beta.waze.com/*editor*
  10. // @match https://www.waze.com/*editor*
  11. // @author Rick Zabel '2014
  12. // @license MIT/BSD/X11
  13. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQyQjZDNjdEODYzODExRTRBRDY0Q0I2QjA1MjU4N0EyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQyQjZDNjdFODYzODExRTRBRDY0Q0I2QjA1MjU4N0EyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDJCNkM2N0I4NjM4MTFFNEFENjRDQjZCMDUyNTg3QTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDJCNkM2N0M4NjM4MTFFNEFENjRDQjZCMDUyNTg3QTIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6++Bk8AAANOElEQVR42tRZCWxU1xW9M39mPB5v431fMLYJdmpjthQUVsdlS9IQQkpIIDRhl5pKQUpbKkAEpakQIhVVRUytQIGwihCaBkgItQELQosxdrDZ7Njjbbx7vM0+f3ruZDz1NmTGhEj59tOb//979553313fl9jtdvqpXbLHRVgikTz0NbdJkyYJERERUp1OJ1Wr1WJLS4tYXFxswzu7s408+XFJ2g1oSUZGhtzf318piqLKx8dHZbPZFFKpVMC9TRAEs8lk0uNe39vbaywvL7eMBP5HAz179myZxWLxxfNg3IZHRkbG5OTkpEPSkQAs1Wq1nQUFBVXt7e2twNSGMdx3yuVyQ2FhofVHBw01kCsUigA8i1m9evXc3Nzc5TExMRMhUfnAOZC6VaPRlJ8+ffrzM2fOXMW9BvgazWZzD9TG8qOBZgnr9fqg5OTklPfff39bUlLSfL3ZKvmmqZ2q2rqoy2h2jAtSKmhsaBD9LDqUVAqZ/fbt29c2b978IfS9HCqjUalUXf0Sfyygp0+f7kB8584d6bhx4/xTU1PT9uzZk69WB2derdHSxQf1ZLTaRpyrlAmUkxpH05OiqbGxoWrjxo07Wltbb0KFNNevX+/FENEBmqUyWvCTJ0+WDPEKrh4S8oFXiDp+/HhedHT0M6fKvqWbDa0e0Z0YG05LMpPp/v37xWvXrn0XqlRWX1+vraysNEkfZu38zE1zXHPmzOH53ARuAQEBUuieBM2OJoaFhSl27NixAPr7TGFVo8eA+eKxPAc7Nen111/PgX5HxMXF+TIsmSe+1bkbEuintKamRoBeyqxWq6Knp0eA2xJAUAJ3Zce9+PTTT9tkMpkF7opgQEEwwjU6g4kKKhu83sWCynrKjg2jhQsXPrd///4L2Dkm0iv9PntiSUIF5JmZmSpMCsI2hwNMNBYSC4+QgLUkoE909vF4HoP3kVhY+Pz589Mh/czi+layiqLXoK2inXhuVFRUUlZWViIE45eSkiI8LCKyZAUAZbfki8sfxhA4bdq0+GXLluUmJCRMBqCxkHQY9E2BdxwY2iDtqtra2hsHDhy4jIVOYTqV8BIDr3ERakd/r0Xn9nf/9aBNx4YpmTlzZtrNmzcvBwUFuQXNIZaDgRJS84eDV8+bN2/cqlWr1rF+AqTMbDFRU72WdI29ZNZbSaGSKdQx/jFRcdExERGTZ6Snp/8GYbmGiXVBPQZeyyakOvrtX/7X7e/+S2f4ziXCPoIhaam73MMBGJcvBgXBP4bv3LnztSlTpmwAWOW9svtU/kkd1V/rINE23ONIBQnFTQuh1OciZXHJsSn8TBwy7NitB67g7O53/yX8386sHOqhgnbZSCrBEoaOqpVKZXReXt5W6OfC5uZGuvjnW9RU2v1QPbRZ7aS50kbVl5spY2kHLdg4i0L9lNRtMrvGDNx+d7/7rxCVj6Nva2vTArARPts21BClHR0dPqy7MKgIAOYItrD8ZgUdWXmFtCVdZIfYPGsILufqsBsipYYHjTpQpYWrCXjEixcv3oKX6oNXGgRasmDBAhkyMD+MCd21a9dKAF5QUVxB598uJZvR5nB9njZHcOm20oOva2lKfAT5yASvAXN0nIy5zc3NJRUVFd/CvvpY26QDsjABhqMEw0AYXQZ0eG1TUwOd+30pr9QrwA7Q+JfapVT0j1sE46BF4xO9Bv1sehIDF8+ePfsR7KmF01UOG/06LUGIFIKDg33hwtRvvPHGagzyOf9uMVlNVrdEx+ZEUdZLSZSYlkBymYK6ejrp/rVqupFfTT3NBodNNd1pp6IjJTRzxSRHcsR5hyfXL9LiaWJcOOcvJ/Pz8wvgSjud+bXLe0iR3yogIb+JEyeOiY+Pn1VRUkHaMt3I5Y5CSs/unkTjJ4wf9FwdGEJT54VQ1px0Or21kKqLWhGdZHRpXwn5h6goZ9F4ig5UEecgBsvIwghVKSHhRPjsYIIgv3jrrbfeMxqNWrhQA0DbXaChGhKkjwpI2W/JkiXsh4XS4xq3SdSczRnDAA+8fBS+9OKOuZS/4jPS1fUhlRTo0z8VUGeHjua+Ng3pp47+U9viGv8Egkp0oB+NCQlEehrI6mhEarpvw4YNfzMYDM3IEntPnjxpG1QjsmogPCtgnX6JiYnZJrPRISW7OBy0b4Ccsudkfu/2KuQ+NGXtGPrij9+QiD8b/vyDVWSDfVQ0dTrGBPjI6YUnk+mJyGDOF+wACCj1Xx47duwQ9Pge7ruReJmcdePgwjY8PFzKtRoinxKpZFJjbSNXESOCCc8IIgQdj/QyeUI8AkupA3DChCiaujCTyps7KF7tT2mQ7oSYMJJJyFp840beoUOHjiBM17OHAG8DUgTzgCJ3eDXOKSUsU4ZtUSDHUHc0drlVjYAYpcfWLyBL6KczY/kkkkgl9CQqE27skZAb30Cuve/ChQuFiA9aCM9YVFRke1gl7gKN1UkQtlnaUq7bLMglyA3omGzPA0VjdZODDjJwOrXlIl3PKiOFv5ySc8IoKT2BkMt8AL4VXMjCyPq+D+ywcw+AtbNKoFnkKplctItDPIZArx6cRWOSx3oMuvhgFfXTsejtVH2tyZHspuZGENwru68upAt9UDeLp4DJWXUQJyFI6kVMtvX19XWExquHBQsL/PX9As8T+Suffk0PLjcOCjZkl3CFR5Fjwnh3O2BDlv4kyJvA5QDNFYczizK3t7fXxMbHkVQhcUhpYCvaW0H7Vp+iqsoHDwX87xNF9MWOkmHzuTHdmLg4gg5XMz/m6+RPXkkamZOIbeItMty7d++WXCan1LnRHOaHtbpbzVT4QZljxTbRRof/8E/au+oEHd3+LxewygtNI87llga6TP/u3bulzI/5Mn+vz/JQMNpQdXCmrj948GBRbm7uqqmvjfOpOKsZcdK317T0l5c/JptJpM7671LV+jJCFvixw0O01ejcV++vphFU0XT48OEi2I+e8yrm77WkCwsLRURDM3S6j8t0RKPC1CfSaOysGLd61VrZSR11XYOetWl01Frd6XYO00sbP47gKQpRkmmZH/Nl/l6DZhMBWOT+FnY7nbt37z4Bwfcs3jaLfIOUXmd4IzWmw/SYLtNnPsyP+XrjOQaBhqO3wmfqwUBXVVVVjVj/kTooxL48fzYJPsKIRuVp4/lMh+kxXabPfJgf8x0taEcph2TbzPEev1v27t174dKlS6fGpqTSm0fnU0C4alQS5nk8n+mA3idMl+kzH+bntFAaLWiWNm+VHv6zHX3D1q1bD3/11VcnksYki7898yvKfGkMOHgGlsdlvphMPI/nMx3QO8R0nfT1Tn5en8e5zvIGFrZc6fDBDIhHwJfGvvLKK7NXrFjxa+QoIVptA109WUqlJ2uot1M/jKBcIaOpq9Jo+tIsio6O5RjQgWToo6NHj15C1G2AHrfA+PggxAgDdOUZ3pwlDgU9CDhcUgDcUxisPDIkJCQBCflzTz311BzUkUG1dTX01+c/Iat5sLd6YefPadaiGQy2+/r16wV79uz5rLOzUwNazdDhNtDqGQr4hwDtAg7GCpVK5YeQq4bUQyCpSDCOfeedd55HHTm/8MwV+nTzVdekJ+cn0Zu7XubsrWLNmjUfYpfq0Jqw8HaEah0KjT5OOYcC/qFAu87xAF6u0+mU2FJ/gOZTnkg8jz9w4MCm5OTkjL+/fYxun9eQOiqAfvf5ShQOEt26deve1Wg0d0FbC3VoR+tBns7StTgNzz7SIedoDJFGOGfmbbYhxzZBWj0A3c6SQ2vYtm1bPpKrruXvLSJ1tD+9ujeHfJV+Yl5e3n4EjkoGDJVoY8A8f0ColgykP6qvDCPp9NKlS6UlJSUyqIYMDAU+u8MYmfNLlD+kHQbgcYsXL56xadOm9XpDr9RPFUAFBQVfbtmy5Qho1rFb4zVjjhH31sDAQCvcHJ+7WLu7u22IitaBn94eRT1cugxg/CXKl8/vMEbOF/d8tIBxfIIaivvI7du3/zInJ2d2XV1dzcqVKz+EZDlb4tPzHrw3YryZQXNihN0y8yIw1xAREWE8d+5cv7o8EmhpSkqKHGWPH0Cr+XiMz4TZk3Apxh6tHziYx+J3KNYSCA+xaOfOnVeqq6ubQUuH941o7NYYlJULC4w14Z0ehtyLe37XY8SFOtD6HWa7d1newEVwkcuqwODQs5T5k4EvepY+PxMgMTkWwc9l4Gtfv379ebwX0QS89+HzE/Qc7fhs28qVCcYL/LUAcy0Od65QCJj7g3xmtrPBREVFOXJrMOdi1wYAnLbKISHWbWbOC+vg+XzPjZUV4/mrq5V7bpC2o7jghnszABv4EJH9NPhY+w9fHhl0dna2FQQNXE1gK01wdQpIhMexWjgAcyXt7LmxivEnGTvXmUyDF8D3zm13nCszcNZrVhN4HRaC2Z37G5X36P/YjtJLCA0NlfIRA38UQi+BtCT8Ycj5hVUy/NhAcIFgb8H3SqVSZCH4+fmJ7DmgguLjiIhDvwmyG+SyTALmHvtYLNIOcHaei5S0H5X9UYPL/wQYAOwQASZqvrLnAAAAAElFTkSuQmCC
  14.  
  15. // ==/UserScript==
  16.  
  17. /* global $, W, I18n */
  18.  
  19. const urcDEBUG = false;
  20. function log(message) { console.log("URC: ", message); }
  21. function logError(message) { console.error("URC: ", message); }
  22. function logDebug(message) { if (urcDEBUG) console.debug("URC: ", message); }
  23. function logWarning(message) { console.warn("URC: ", message); }
  24. function urctoConsole(message) { if (urcDEBUG) console.log("URC: ", message); }
  25.  
  26.  
  27.  
  28. //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;
  29. //to make this script find open URs faster change the number 1000 to something smaller this is in milliseconds 1000 = 1 second
  30. //line 892 it looks like this setTimeout(URComments.LookForOpenedUR, 1000); // 1 second search
  31. //line 892 it looks like this setTimeout(URComments.LookForOpenedUR, 500); // .5 second search
  32. var URCommentVersion = GM_info.script.version;//var URCommentVersion = "1.5.4"; //branched from 0.9.3
  33. var URCommentUpdateMessage = "yes"; // yes alert the user, no has a silent update.
  34.  
  35. /* Changelog
  36. The change log has been moved to https://docs.google.com/spreadsheets/d/1PM4bOYGJxL82E4th2yy87ZzQKpMDF4N1dcKZ2evXc5o/edit?usp=sharing
  37. This sheet will now be used to also track editor requests, to add a request please pm me on waze at rickzabel
  38. */
  39.  
  40. //here is my todo; remove ur count, instruction link in new window
  41.  
  42. var URCommentVersionUpdateNotes = "UR Comments has been updated to " + URCommentVersion;
  43. URCommentVersionUpdateNotes = URCommentVersionUpdateNotes + "\n" + "Reverted the Descartes link.";
  44.  
  45.  
  46. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  47. //////
  48. ////// Define items that need to be at the root level so they can be used inside functions
  49. //////
  50. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  51.  
  52. var urcTabLoaded = false;
  53. var urcListLoaded = false;
  54. var prevSelectedBoilerPlateCreator = "";
  55.  
  56. //use this for counting how many times we waited for waze to finish a task..
  57. //currently used to write to the console so the code is easier to debug
  58. //in the future we might do actions if we waited to long
  59. var PauseCount = "1";
  60.  
  61. //these are the names of the comments lists built into the script and will show up in the comment list drop down
  62. var BoilerPlateCreatorsArray = [
  63. "CommentTeam",
  64. "Custom",
  65. "CustomGSheets", //dbsooner https://greatest.deepsurf.us/en/scripts/374552-wme-urcomments-customgsheets
  66. "BrazilianPortuguese", //reached out 10/15/17, needs waze match urls updated Murilo-Carvalho mcarvalho79&gmail.com https://greatest.deepsurf.us/en/scripts/7292-wme-ur-comments-brazilianportuguese-list
  67. "ColombianSpanish", //working 11/15/18 Mincho77 mincho77&gmail.com https://greatest.deepsurf.us/en/scripts/13840-wme-urcomments-colombian-spanish-list
  68. //"Czech", // Zirland zirland&gmail.com tehy decided not to use the script
  69. "DominicanSpanish", //working 11/15/18 RafaCintron rafaelcintron at gmail.com
  70. "Dutch", //working 11/15/18 moweez moweeznh&gmail.com updated https://greatest.deepsurf.us/nl/scripts/7276-wme-ur-comments-dutch-list
  71. "IndiaEnglish", //working 11/15/18 moweez moweeznh&gmail.com https://greatest.deepsurf.us/en/scripts/21774-wme-urcomments-india-english-list
  72. "IndonesianBahasa", //reached out 10/15/17, //projectronic projectronic&gmail.com https://greatest.deepsurf.us/en/scripts/13197-wme-urcomments-bahasa-indonesia
  73. "International", //working 11/15/18 moweez moweeznh&gmail.com updated https://greatest.deepsurf.us/en/scripts/13272-wme-urcomments-international-list/code
  74. "IsraeliHebrew", //reached out 10/15/17 crayzee, ktamir&gmail.com updated https://greatest.deepsurf.us/en/scripts/8682-wme-urcomments-hebrew-list
  75. "Italian", //working 11/15/18 Fabianotkd, fabiano.fumarola&gmail.com https://greatest.deepsurf.us/en/scripts/32537-wme-urcomments-italian-list/code
  76. "Lithuanian", //reached out 11/15/18 moweez https://greatest.deepsurf.us/en/scripts/16528-wme-urcomments-lithuanian-list
  77. "Persian", //working 11/15/18 Saeed https://greatest.deepsurf.us/en/scripts/28201-wme-urcomments-persian-list
  78. "Polish", //working 11/15/18 //TCholewa tomasz.cholewa&gmail.com https://greatest.deepsurf.us/en/scripts/23536-wme-urcomments-polish-list
  79. "PortugalPortuguese", //working 11/15/18 Ricardo-Ruivo tco2005&gmail.com https://greatest.deepsurf.us/en/scripts/34305-wme-urcomments-portuguese-pt-pt-list
  80. "Romanian", //working 11/15/18 spookyx (paul) https://greatest.deepsurf.us/en/scripts/25024-wme-urcomments-romanian-list
  81. "Malaysian", //working 11/15/18 RisingSun, mobiletopupbusiness&gmail.com updated https://greatest.deepsurf.us/en/scripts/16261-wme-urcomments-malaysia-list/code
  82. "SouthAfrica", //working 03/10/19 BashTux, huter&gmail.com https://greatest.deepsurf.us/en/scripts/379347-wme-urcomments-southafrica-list/code
  83. "Spanish", //working 11/15/18 Cefin Otero https://greatest.deepsurf.us/en/scripts/14100-wme-urcomments-spanish-list
  84. "Swiss", //working 11/15/18 vince1612&gmail.com https://greatest.deepsurf.us/en/scripts/17289-wme-urcomments-swiss-list/code
  85. "USA_SouthCentral", //working 11/15/18 turnertr & dbsooner & USA_SouthCentral comments team! https://greatest.deepsurf.us/en/scripts/31177-wme-urcomments-usa-southcentral
  86. "USA_Southeast", //working 11/15/18 itzwolf https://greatest.deepsurf.us/en/scripts/28387-wme-urcomments-usa-southeast
  87.  
  88. "---User's Lists---",
  89. "PesachZ", //working 11/15/18 PesachZ https://greatest.deepsurf.us/en/scripts/7272-wme-ur-comments-pesachz-list
  90. //"orbit" // https://greatest.deepsurf.us/en/users/8079-orbit
  91. "---Loading---"
  92.  
  93.  
  94. ];
  95.  
  96. //get the SelectedBoilerPlateCreator
  97. var SelectedBoilerPlateCreator = localStorage.getItem('BoilerPlateCreators');
  98. //console.log( SelectedBoilerPlateCreator);
  99.  
  100. //if the comment list hasn't been chosen default to the CommentTeam's list
  101. if (SelectedBoilerPlateCreator === "" || SelectedBoilerPlateCreator === null || SelectedBoilerPlateCreator === "rickzabel") {
  102. SelectedBoilerPlateCreator = "CommentTeam";
  103. localStorage.setItem('BoilerPlateCreators', SelectedBoilerPlateCreator);
  104. //localStorage.setItem('BoilerPlateCreators', 'CommentTeam');
  105. }
  106.  
  107. //array that holds the comments
  108. var URCommentsArray = [];
  109.  
  110. //these are the holders for the position in the comments list that the reminder and close messages are at
  111. var ReminderPosistion = "";
  112. var CloseNotIdentifiedPosistion = "";
  113.  
  114.  
  115. var def_names = []; //default waze message array
  116. var URC_Text = []; //URC text
  117. var URC_URL = []; //URC text
  118. var URC_Text_tooltip = []; //URC tool-tip text
  119. var URC_USER_PROMPT = []; //URC Alerts, Confirmations, and orange box messages
  120.  
  121. //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
  122. var CloseButtonHolder = "";
  123. //since we are scanning for open UR I need to keep track of the current urID so the comments can be overridden
  124. var UrCommentLasturID = "";
  125.  
  126. //this is used to hold the info about the previous tab, before we auto switched tabs
  127. var PreviousTab = null;
  128. var PreviousTabPosistion = null;
  129.  
  130.  
  131. //used to track if we are switching languages
  132. var ChangeLanguage = false;
  133.  
  134. //return to zoom instead of zoom 0
  135. var ReturnToCurrentZoom = "";
  136.  
  137. var UrCommentsIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAwCAYAAACFUvPfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjQyQjZDNjdEODYzODExRTRBRDY0Q0I2QjA1MjU4N0EyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjQyQjZDNjdFODYzODExRTRBRDY0Q0I2QjA1MjU4N0EyIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NDJCNkM2N0I4NjM4MTFFNEFENjRDQjZCMDUyNTg3QTIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NDJCNkM2N0M4NjM4MTFFNEFENjRDQjZCMDUyNTg3QTIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6++Bk8AAANOElEQVR42tRZCWxU1xW9M39mPB5v431fMLYJdmpjthQUVsdlS9IQQkpIIDRhl5pKQUpbKkAEpakQIhVVRUytQIGwihCaBkgItQELQosxdrDZ7Njjbbx7vM0+f3ruZDz1NmTGhEj59tOb//979553313fl9jtdvqpXbLHRVgikTz0NbdJkyYJERERUp1OJ1Wr1WJLS4tYXFxswzu7s408+XFJ2g1oSUZGhtzf318piqLKx8dHZbPZFFKpVMC9TRAEs8lk0uNe39vbaywvL7eMBP5HAz179myZxWLxxfNg3IZHRkbG5OTkpEPSkQAs1Wq1nQUFBVXt7e2twNSGMdx3yuVyQ2FhofVHBw01kCsUigA8i1m9evXc3Nzc5TExMRMhUfnAOZC6VaPRlJ8+ffrzM2fOXMW9BvgazWZzD9TG8qOBZgnr9fqg5OTklPfff39bUlLSfL3ZKvmmqZ2q2rqoy2h2jAtSKmhsaBD9LDqUVAqZ/fbt29c2b978IfS9HCqjUalUXf0Sfyygp0+f7kB8584d6bhx4/xTU1PT9uzZk69WB2derdHSxQf1ZLTaRpyrlAmUkxpH05OiqbGxoWrjxo07Wltbb0KFNNevX+/FENEBmqUyWvCTJ0+WDPEKrh4S8oFXiDp+/HhedHT0M6fKvqWbDa0e0Z0YG05LMpPp/v37xWvXrn0XqlRWX1+vraysNEkfZu38zE1zXHPmzOH53ARuAQEBUuieBM2OJoaFhSl27NixAPr7TGFVo8eA+eKxPAc7Nen111/PgX5HxMXF+TIsmSe+1bkbEuintKamRoBeyqxWq6Knp0eA2xJAUAJ3Zce9+PTTT9tkMpkF7opgQEEwwjU6g4kKKhu83sWCynrKjg2jhQsXPrd///4L2Dkm0iv9PntiSUIF5JmZmSpMCsI2hwNMNBYSC4+QgLUkoE909vF4HoP3kVhY+Pz589Mh/czi+layiqLXoK2inXhuVFRUUlZWViIE45eSkiI8LCKyZAUAZbfki8sfxhA4bdq0+GXLluUmJCRMBqCxkHQY9E2BdxwY2iDtqtra2hsHDhy4jIVOYTqV8BIDr3ERakd/r0Xn9nf/9aBNx4YpmTlzZtrNmzcvBwUFuQXNIZaDgRJS84eDV8+bN2/cqlWr1rF+AqTMbDFRU72WdI29ZNZbSaGSKdQx/jFRcdExERGTZ6Snp/8GYbmGiXVBPQZeyyakOvrtX/7X7e/+S2f4ziXCPoIhaam73MMBGJcvBgXBP4bv3LnztSlTpmwAWOW9svtU/kkd1V/rINE23ONIBQnFTQuh1OciZXHJsSn8TBwy7NitB67g7O53/yX8386sHOqhgnbZSCrBEoaOqpVKZXReXt5W6OfC5uZGuvjnW9RU2v1QPbRZ7aS50kbVl5spY2kHLdg4i0L9lNRtMrvGDNx+d7/7rxCVj6Nva2vTArARPts21BClHR0dPqy7MKgIAOYItrD8ZgUdWXmFtCVdZIfYPGsILufqsBsipYYHjTpQpYWrCXjEixcv3oKX6oNXGgRasmDBAhkyMD+MCd21a9dKAF5QUVxB598uJZvR5nB9njZHcOm20oOva2lKfAT5yASvAXN0nIy5zc3NJRUVFd/CvvpY26QDsjABhqMEw0AYXQZ0eG1TUwOd+30pr9QrwA7Q+JfapVT0j1sE46BF4xO9Bv1sehIDF8+ePfsR7KmF01UOG/06LUGIFIKDg33hwtRvvPHGagzyOf9uMVlNVrdEx+ZEUdZLSZSYlkBymYK6ejrp/rVqupFfTT3NBodNNd1pp6IjJTRzxSRHcsR5hyfXL9LiaWJcOOcvJ/Pz8wvgSjud+bXLe0iR3yogIb+JEyeOiY+Pn1VRUkHaMt3I5Y5CSs/unkTjJ4wf9FwdGEJT54VQ1px0Or21kKqLWhGdZHRpXwn5h6goZ9F4ig5UEecgBsvIwghVKSHhRPjsYIIgv3jrrbfeMxqNWrhQA0DbXaChGhKkjwpI2W/JkiXsh4XS4xq3SdSczRnDAA+8fBS+9OKOuZS/4jPS1fUhlRTo0z8VUGeHjua+Ng3pp47+U9viGv8Egkp0oB+NCQlEehrI6mhEarpvw4YNfzMYDM3IEntPnjxpG1QjsmogPCtgnX6JiYnZJrPRISW7OBy0b4Ccsudkfu/2KuQ+NGXtGPrij9+QiD8b/vyDVWSDfVQ0dTrGBPjI6YUnk+mJyGDOF+wACCj1Xx47duwQ9Pge7ruReJmcdePgwjY8PFzKtRoinxKpZFJjbSNXESOCCc8IIgQdj/QyeUI8AkupA3DChCiaujCTyps7KF7tT2mQ7oSYMJJJyFp840beoUOHjiBM17OHAG8DUgTzgCJ3eDXOKSUsU4ZtUSDHUHc0drlVjYAYpcfWLyBL6KczY/kkkkgl9CQqE27skZAb30Cuve/ChQuFiA9aCM9YVFRke1gl7gKN1UkQtlnaUq7bLMglyA3omGzPA0VjdZODDjJwOrXlIl3PKiOFv5ySc8IoKT2BkMt8AL4VXMjCyPq+D+ywcw+AtbNKoFnkKplctItDPIZArx6cRWOSx3oMuvhgFfXTsejtVH2tyZHspuZGENwru68upAt9UDeLp4DJWXUQJyFI6kVMtvX19XWExquHBQsL/PX9As8T+Suffk0PLjcOCjZkl3CFR5Fjwnh3O2BDlv4kyJvA5QDNFYczizK3t7fXxMbHkVQhcUhpYCvaW0H7Vp+iqsoHDwX87xNF9MWOkmHzuTHdmLg4gg5XMz/m6+RPXkkamZOIbeItMty7d++WXCan1LnRHOaHtbpbzVT4QZljxTbRRof/8E/au+oEHd3+LxewygtNI87llga6TP/u3bulzI/5Mn+vz/JQMNpQdXCmrj948GBRbm7uqqmvjfOpOKsZcdK317T0l5c/JptJpM7671LV+jJCFvixw0O01ejcV++vphFU0XT48OEi2I+e8yrm77WkCwsLRURDM3S6j8t0RKPC1CfSaOysGLd61VrZSR11XYOetWl01Frd6XYO00sbP47gKQpRkmmZH/Nl/l6DZhMBWOT+FnY7nbt37z4Bwfcs3jaLfIOUXmd4IzWmw/SYLtNnPsyP+XrjOQaBhqO3wmfqwUBXVVVVjVj/kTooxL48fzYJPsKIRuVp4/lMh+kxXabPfJgf8x0taEcph2TbzPEev1v27t174dKlS6fGpqTSm0fnU0C4alQS5nk8n+mA3idMl+kzH+bntFAaLWiWNm+VHv6zHX3D1q1bD3/11VcnksYki7898yvKfGkMOHgGlsdlvphMPI/nMx3QO8R0nfT1Tn5en8e5zvIGFrZc6fDBDIhHwJfGvvLKK7NXrFjxa+QoIVptA109WUqlJ2uot1M/jKBcIaOpq9Jo+tIsio6O5RjQgWToo6NHj15C1G2AHrfA+PggxAgDdOUZ3pwlDgU9CDhcUgDcUxisPDIkJCQBCflzTz311BzUkUG1dTX01+c/Iat5sLd6YefPadaiGQy2+/r16wV79uz5rLOzUwNazdDhNtDqGQr4hwDtAg7GCpVK5YeQq4bUQyCpSDCOfeedd55HHTm/8MwV+nTzVdekJ+cn0Zu7XubsrWLNmjUfYpfq0Jqw8HaEah0KjT5OOYcC/qFAu87xAF6u0+mU2FJ/gOZTnkg8jz9w4MCm5OTkjL+/fYxun9eQOiqAfvf5ShQOEt26deve1Wg0d0FbC3VoR+tBns7StTgNzz7SIedoDJFGOGfmbbYhxzZBWj0A3c6SQ2vYtm1bPpKrruXvLSJ1tD+9ujeHfJV+Yl5e3n4EjkoGDJVoY8A8f0ColgykP6qvDCPp9NKlS6UlJSUyqIYMDAU+u8MYmfNLlD+kHQbgcYsXL56xadOm9XpDr9RPFUAFBQVfbtmy5Qho1rFb4zVjjhH31sDAQCvcHJ+7WLu7u22IitaBn94eRT1cugxg/CXKl8/vMEbOF/d8tIBxfIIaivvI7du3/zInJ2d2XV1dzcqVKz+EZDlb4tPzHrw3YryZQXNihN0y8yIw1xAREWE8d+5cv7o8EmhpSkqKHGWPH0Cr+XiMz4TZk3Apxh6tHziYx+J3KNYSCA+xaOfOnVeqq6ubQUuH941o7NYYlJULC4w14Z0ehtyLe37XY8SFOtD6HWa7d1newEVwkcuqwODQs5T5k4EvepY+PxMgMTkWwc9l4Gtfv379ebwX0QS89+HzE/Qc7fhs28qVCcYL/LUAcy0Od65QCJj7g3xmtrPBREVFOXJrMOdi1wYAnLbKISHWbWbOC+vg+XzPjZUV4/mrq5V7bpC2o7jghnszABv4EJH9NPhY+w9fHhl0dna2FQQNXE1gK01wdQpIhMexWjgAcyXt7LmxivEnGTvXmUyDF8D3zm13nCszcNZrVhN4HRaC2Z37G5X36P/YjtJLCA0NlfIRA38UQi+BtCT8Ycj5hVUy/NhAcIFgb8H3SqVSZCH4+fmJ7DmgguLjiIhDvwmyG+SyTALmHvtYLNIOcHaei5S0H5X9UYPL/wQYAOwQASZqvrLnAAAAAElFTkSuQmCC";
  138.  
  139. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  140. //////
  141. ////// bootstrap
  142. //////
  143. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  144.  
  145.  
  146. /*function urctoConsole(logtext) {
  147. console.log('URComments: '+logtext);
  148. }*/
  149.  
  150. //setup keyboard shortcut's header and add a keyboard shortcuts
  151. function WMEKSRegisterKeyboardShortcut(ScriptName, ShortcutsHeader, NewShortcut, ShortcutDescription, FunctionToCall, ShortcutKeysObj) {
  152. //check for and add keyboard shourt group to WME
  153. try {
  154. var x = I18n.translations[I18n.currentLocale()].keyboard_shortcuts.groups[ScriptName].members.length;
  155. } catch (e) {
  156. //setup keyboard shortcut's header
  157. W.accelerators.Groups[ScriptName] = []; //setup your shortcut group
  158. W.accelerators.Groups[ScriptName].members = []; //set up the members of your group
  159. I18n.translations[I18n.currentLocale()].keyboard_shortcuts.groups[ScriptName] = []; //setup the shortcuts text
  160. I18n.translations[I18n.currentLocale()].keyboard_shortcuts.groups[ScriptName].description = ShortcutsHeader; //Scripts header
  161. I18n.translations[I18n.currentLocale()].keyboard_shortcuts.groups[ScriptName].members = []; //setup the shortcuts text
  162. }
  163. //check if the function we plan on calling exists
  164. if (FunctionToCall && (typeof FunctionToCall == "function")) {
  165. I18n.translations[I18n.currentLocale()].keyboard_shortcuts.groups[ScriptName].members[NewShortcut] = ShortcutDescription; //shortcut's text
  166. W.accelerators.addAction(NewShortcut, {
  167. group: ScriptName
  168. }); //add shortcut one to the group
  169. //clear the short cut other wise the previous shortcut will be reset MWE seems to keep it stored
  170. var ClearShortcut = '-1';
  171. var ShortcutRegisterObj = {};
  172. ShortcutRegisterObj[ClearShortcut] = NewShortcut;
  173. W.accelerators._registerShortcuts(ShortcutRegisterObj);
  174.  
  175. if (ShortcutKeysObj !== null) {
  176. //add the new shortcut
  177. ShortcutRegisterObj = {};
  178. ShortcutRegisterObj[ShortcutKeysObj] = NewShortcut;
  179. W.accelerators._registerShortcuts(ShortcutRegisterObj);
  180. }
  181. //listen for the shortcut to happen and run a function
  182. W.accelerators.events.register(NewShortcut, null, function() {
  183. FunctionToCall();
  184. });
  185. } else {
  186. alert('The function ' + FunctionToCall + ' has not been declared');
  187. }
  188.  
  189. }
  190.  
  191. //if saved load and set the shortcuts
  192. function WMEKSLoadKeyboardShortcuts(ScriptName) {
  193. if (localStorage[ScriptName + 'KBS']) {
  194. var LoadedKBS = JSON.parse(localStorage[ScriptName + 'KBS']); //JSON.parse(localStorage['WMEAwesomeKBS']);
  195. for (var i = 0; i < LoadedKBS.length; i++) {
  196. W.accelerators._registerShortcuts(LoadedKBS[i]);
  197. }
  198. }
  199. }
  200.  
  201. function WMEKSSaveKeyboardShortcuts(ScriptName) {
  202. //return function() {
  203. var TempToSave = [];
  204. for (var name in W.accelerators.Actions) {
  205. //console.log(name);
  206. var TempKeys = "";
  207. if (W.accelerators.Actions[name].group == ScriptName) {
  208. if (W.accelerators.Actions[name].shortcut) {
  209. if (W.accelerators.Actions[name].shortcut.altKey === true) {
  210. TempKeys += 'A';
  211. }
  212. if (W.accelerators.Actions[name].shortcut.shiftKey === true) {
  213. TempKeys += 'S';
  214. }
  215. if (W.accelerators.Actions[name].shortcut.ctrlKey === true) {
  216. TempKeys += 'C';
  217. }
  218. if (TempKeys !== "") {
  219. TempKeys += '+';
  220. }
  221. if (W.accelerators.Actions[name].shortcut.keyCode) {
  222. TempKeys += W.accelerators.Actions[name].shortcut.keyCode;
  223. }
  224. } else {
  225. TempKeys = "-1";
  226. }
  227. var ShortcutRegisterObj = {};
  228. ShortcutRegisterObj[TempKeys] = W.accelerators.Actions[name].id;
  229. TempToSave[TempToSave.length] = ShortcutRegisterObj;
  230. }
  231. }
  232. localStorage[ScriptName + 'KBS'] = JSON.stringify(TempToSave);
  233. //}
  234. }
  235.  
  236. //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
  237. function URComments_bootstrap() {
  238. //urctoConsole("Test");
  239. //get the SelectedBoilerPlateCreator
  240. var SelectedBoilerPlateCreator = localStorage.getItem('BoilerPlateCreators');
  241.  
  242. /////////////////////////////////////////////////////////////////////////////////////////////////////////////
  243. // these is the array used to store the ur comments
  244. // comment arrays should follow the format
  245. // "Title", * is what will show up in the ur comment tab
  246. // "comment", * is the comment that will be sent to the user currently
  247. // "URStatus" * this is action to take when the option "Auto Click Open, Solved, Not Identified" is on.
  248. // after clicking send it will click one of those choices. usage is. "Open", or "Solved",or "NotIdentified",
  249. /////////////////////////////////////////////////////////////////////////////////////////////////////////////
  250.  
  251. if (SelectedBoilerPlateCreator === "CommentTeam") {
  252.  
  253. URCommentsArray = [
  254. "No further communication",
  255. "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!",
  256. "Solved", //t0cableguy 12/8/14 //rickzabel 12/8/14 , karlcr9911 12/8/14
  257.  
  258. "Fixed",
  259. //"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
  260. //"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
  261. "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
  262. "Solved",
  263.  
  264. "Address Adjustments",
  265. //"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.",
  266. "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
  267. "Solved",
  268.  
  269. "Address in correct spot",
  270. "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!",
  271. "Solved", //karlcr9911 rickzabel 4/3/2015
  272.  
  273. "The road has been closed",
  274. //"Thank you for your report, the road has been closed.",
  275. //"Volunteer responding - Thank you for your report, the road has been closed.", //rickzabel 1211/14
  276. "Volunteer responding - Thank you for your report. The road has been closed.", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  277. "Solved", //requested by SkiDooGuy //changed to NotIdentified by karlcr9911 4/3/2015 //7/22/2015 changed to Solved by karlcr9911
  278.  
  279. "Fixed Speed Limit",
  280. "The missing/incorrect speed limit you reported has been updated. Thank you!",
  281. "Solved", //karlcr9911 rickzabel
  282.  
  283. "Address fishing",
  284. //"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!"
  285. //"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
  286. //"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!",
  287. //this is going to be the message we voted on above! rickzabel 12/8/14
  288. "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
  289. "Open",
  290.  
  291. "Errors with no text",
  292. //"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
  293. "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
  294. "Open",
  295.  
  296. "Reminder message", //do not change (rickzabel)
  297. //"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
  298. "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
  299. "Open",
  300.  
  301. "No reply close message",
  302. //"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
  303. "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
  304. "NotIdentified",
  305.  
  306. "Speed Limit Already Set",
  307. "Volunteer responding; The speed limit here is already set correctly. In the future, please submit speed limit requests near the point where the speed limit changes. If the speed limit change is temporary due to construction, please advise and provide additional details. If you would like to see speed limits at all times while using the app, please go to Settings > Speedometer > Show speed limit. Thank you!",
  308. "NotIdentified", //rickzabel karlcr9911 8/31/2016
  309.  
  310. "App Bug",
  311. "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/6276841",
  312. "NotIdentified", //twintiggrz, t0cableguy, rickzabel 12/27/2015
  313.  
  314. "Bad GPS",
  315. "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
  316. "NotIdentified",
  317.  
  318. "Valid Route",
  319. //"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
  320. //"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
  321. //"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
  322. //"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
  323. "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
  324. "NotIdentified",
  325.  
  326. "Valid Left turns",
  327. //"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
  328. "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
  329. "NotIdentified",
  330.  
  331. "Valid Left turns 2",
  332. //"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
  333. "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
  334. "NotIdentified",
  335.  
  336. "Valid but Difficult Route",
  337. //"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
  338. "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
  339. "NotIdentified",
  340.  
  341. "Missing place",
  342. "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!",
  343. "NotIdentified",
  344.  
  345.  
  346. "California double yellow",
  347. "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
  348. "NotIdentified",
  349.  
  350. "Detours / Odd-Routing",
  351. //"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!",
  352. //"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
  353. //"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
  354. //"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
  355. "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
  356. "NotIdentified",
  357.  
  358. "Overall Waze complaint",
  359. "Volunteer responding - You can help make Waze better by reporting problems as you find them. Please include as many details as possible? Thanks!",
  360. "NotIdentified", //rickzabel Pesach 12/22/14
  361.  
  362. "Report to local municipality",
  363. //"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
  364. "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
  365. "NotIdentified",
  366.  
  367. "No user transponder (avoid tolls)",
  368. //"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
  369. //"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
  370. //"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
  371. //"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
  372. "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 the toll icon. Thanks!", //rickzabel 11/24/2016
  373. "NotIdentified",
  374.  
  375. "No user transponder",
  376. //"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
  377. //"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
  378. "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
  379. "NotIdentified",
  380.  
  381. "Not Using HOV",
  382. //"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
  383. "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
  384. "NotIdentified",
  385.  
  386. "U-turns",
  387. //"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
  388. "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
  389. "NotIdentified",
  390.  
  391. "Traffic - Stale Information",
  392. //"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.",
  393. //"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
  394. //”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
  395. "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
  396. "NotIdentified",
  397.  
  398. "Traffic - Jams",
  399. //"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.",
  400. "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
  401. "NotIdentified",
  402.  
  403. "Signal Avoidance Bug",
  404. //"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
  405. //"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
  406. //"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
  407. "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
  408. "NotIdentified",
  409.  
  410. "Already included restrictions",
  411. "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!",
  412. "NotIdentified", //rickzabel Pesach 12/27/14
  413.  
  414. "1000 mile limit",
  415. //"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
  416. "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
  417. "NotIdentified",
  418.  
  419. "Temporary road blockage",
  420. //"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
  421. "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
  422. "NotIdentified",
  423.  
  424. "Temporary Road Closure",
  425. "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!",
  426. "NotIdentified",
  427.  
  428. "Temporary Road Closure",
  429. //"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!",
  430. "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
  431. "Open",
  432.  
  433. "Closure clean-up",
  434. "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
  435. "NotIdentified",
  436.  
  437. "Thanks for the reply",
  438. "Thank you for the reply! This request will be closed. As you travel, please feel welcome to report any map issues you encounter.",
  439. "NotIdentified", //rickzabel 12/27/14
  440.  
  441. "No further communication",
  442. //"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
  443. //"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!",
  444. "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
  445. "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
  446.  
  447. "water non-editable",
  448. "This particular water feature is not editable by the volunteer editors, feel free to report this to support at https://support.google.com/waze/",
  449. "NotIdentified",
  450.  
  451. "Clear TTS Cache",
  452. //"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.",
  453. //"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
  454. //"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
  455. "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 will be re-populated as you use routing.. Thanks!", //GizmoGuy411 t0cableguy rickzabel 2015-04-04
  456. "NotIdentified", //t0cableguy This should be a last chance option for fixing the issue.04-04-2015 //rickzabel 04-04-2015
  457.  
  458. //"Camera report",
  459. //"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
  460. //"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
  461. //"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
  462. //"NotIdentified",
  463.  
  464. "<br>",
  465. "",
  466. "",
  467.  
  468. "Problem appears corrected",
  469. "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!",
  470. "Open", //karlcr9911 12/7/14 t0cableguy 12/8/14 //rickzabel 12/8/14
  471.  
  472. "Clears comment & sets UR status to Open",
  473. "",
  474. "Open",
  475.  
  476. "Include Users Description",
  477. "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!",
  478. "Open",
  479.  
  480. //selected segments requires the use of https://greatest.deepsurf.us/en/scripts/9232-wme-panel-swap
  481. "Include selected segments names",
  482. "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!",
  483. "Open",
  484.  
  485. "Wrong Street Name",
  486. "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",
  487. "Open", //rickzabel Pesach 12/22/14
  488.  
  489.  
  490. "<br>",
  491. "",
  492. "",
  493.  
  494. //Default URs 6 through 22 are all the different types of UR that a user can submit do not change them thanks
  495. "Incorrect turn", //6
  496. //"Would you please let us know what turn you are having a problem with? Thanks!",
  497. //"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
  498. "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
  499. "Open",
  500.  
  501. "Incorrect address", //7
  502. //"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?",
  503. //"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
  504. "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
  505. "Open",
  506.  
  507. "Incorrect route", //8
  508. //"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!",
  509. //"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
  510. "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
  511. "Open",
  512.  
  513. "Missing roundabout", //9
  514. "Volunteer responding - Would you tell us as much as possible about the roundabout you believe is missing? Thanks!",
  515. "Open",
  516.  
  517. "General error", //10
  518. //"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!",
  519. "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
  520. "Open",
  521.  
  522. "Turn not allowed", //11
  523. //"Would you please let us know what turn was not, or should not be, allowed and the street names at the intersection? Thanks!",
  524. //"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
  525. "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
  526. "Open",
  527.  
  528. "Incorrect junction", //12
  529. //"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!",
  530. "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
  531. "Open",
  532.  
  533. "Missing bridge overpass", //13
  534. //"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!",
  535. "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
  536. "Open",
  537.  
  538. "Wrong driving direction", //14
  539. //"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!",
  540. "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
  541. "Open",
  542.  
  543.  
  544. "Missing Exit", //15
  545. //"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!",
  546. "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
  547. "Open",
  548.  
  549. "Missing Road", //16
  550. //"Would you tell us as much as possible about the road you believe is missing? Thanks!",
  551. "Volunteer responding - Would you tell us as much as possible about the road you believe is missing? Thanks!", //rickzabel 12/9/14
  552. "Open",
  553.  
  554.  
  555. "Missing Landmark", //18
  556. "Volunteer responding - Would you tell us as much as possible about the landmark you believe is missing? Thanks!",
  557. "Open",
  558.  
  559. /*
  560. "Blocked Road", //19
  561. "Volunteer responding -",
  562. "Open",
  563.  
  564. "Missing Street Name", //21
  565. "Volunteer responding -",
  566. "Open",
  567.  
  568. "Incorrect Street Prefix or Suffix", ///22
  569. "Volunteer responding -",
  570. "Open",
  571.  
  572.  
  573.  
  574. */
  575.  
  576. "Speed Limit", //23
  577. "Waze did not send us enough information to fix your request. Would you please tell us as much as possible about the issue regarding the speed limit? In the future please submit requests near the point where the speed limit changes. If the speed limit change is temporary due to construction, please advise and provide additional details. If you would like to see speed limits at all times while using the app, please go to Settings > Speedometer > Show speed limit. Thanks!",
  578. "Open", //rickzabel
  579.  
  580.  
  581. "<br>",
  582. "",
  583. "",
  584. //End of Default URs
  585.  
  586. "User Followed Waze's route",
  587. //"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!",
  588. //"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
  589. "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
  590. "Open",
  591.  
  592. "Alley Interference",
  593. //"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!",
  594. //"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
  595. "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
  596. "Open",
  597.  
  598. "Road Closed",
  599. //"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
  600. "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
  601. "Open",
  602.  
  603. "Area Entrances",
  604. "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.",
  605. "Open",
  606.  
  607. "48 Hour Reply",
  608. //"Please allow 48 hours for changes to be reflected in the live map.",
  609. "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
  610. "Open",
  611.  
  612. "Clear Saved Locations",
  613. //"You should remove the location from your favorites and recent searches and then re-search for the location to update the result.",
  614. //"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
  615. "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
  616. "Open",
  617.  
  618. "Address - Incorrect Position",
  619. //"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
  620. //"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
  621. //"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
  622. "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
  623. "Open",
  624.  
  625. "Address - Missing from Map",
  626. //"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
  627. //"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
  628. //"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
  629. "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
  630. "Open",
  631.  
  632. "Address - Bad Results",
  633. //"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.",
  634. //"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
  635. "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
  636. "Open",
  637.  
  638. "House Number Adjustment",
  639. //"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!",
  640. "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
  641. "Open",
  642.  
  643. "Missing Bridges or Roads",
  644. //"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!",
  645. //"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
  646. "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
  647. "Open",
  648.  
  649. "Manual Refresh",
  650. //"You can try a manual refresh by going to Settings > Advanced > Data transfer > refresh maps.",
  651. //"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
  652. //"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
  653. //"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
  654. "Please try doing these options. Tap the Search Icon > Settings gear icon > Display & Map > 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.", // rickzabel 11/24/16
  655. "Open",
  656.  
  657. "Pave Road",
  658. //"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
  659. //"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
  660. //"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
  661. //"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
  662. //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
  663. //"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
  664. //"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
  665. "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
  666. "Open",
  667.  
  668. //"Blank Screen.",
  669. //"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.",
  670. //"Open", //requested by t0cableguy 12/7/14 in map refresh now t0cableguy 12/8/14
  671.  
  672. "Unlock request",
  673. //"I have requested the rights to get this issue fixed. Thanks for your report. Thanks! ", //requested by t0cableguy 12/8/14
  674. //"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…
  675. //"I have begun the process to get this issue fixed. Thanks for your report. Thanks! ",//reword t0cableguy 12/8/14
  676. //"I have begun the process to get this issue fixed. Thanks for your report!", //rickzabel 12/11/14
  677. "I have started the process to get this issue fixed. Thanks for your report!", //GizmoGuy, t0cableguy, rickzabel 1/14/2015
  678. "Open"
  679. ];
  680.  
  681. //auto insertion config:
  682. //the position in the list that the reminder message is at. (counting titles, comments, and ur status)
  683. ReminderPosistion = 24;
  684.  
  685. //the position of the close as Not Identified message that you have in the list (the first comment is the list is 0)
  686. CloseNotIdentifiedPosistion = 27;
  687.  
  688. //Waze's default URs number to name conversion array
  689. //Thanks to SuperMedic
  690.  
  691. def_names[6] = "Incorrect turn";
  692. def_names[7] = "Incorrect address";
  693. def_names[8] = "Incorrect route";
  694. def_names[9] = "Missing roundabout";
  695. def_names[10] = "General error";
  696. def_names[11] = "Turn not allowed";
  697. def_names[12] = "Incorrect junction";
  698. def_names[13] = "Missing bridge overpass";
  699. def_names[14] = "Wrong driving direction";
  700. def_names[15] = "Missing Exit";
  701. def_names[16] = "Missing Road";
  702. def_names[18] = "Missing Landmark";
  703. def_names[19] = "Blocked Road";
  704. def_names[21] = "Missing Street Name";
  705. def_names[22] = "Incorrect Street Prefix or Suffix";
  706. def_names[23] = "Speed Limit"; //speed limit ur type is number 23
  707.  
  708. //zoom out links
  709. URC_Text[0] = "Zoom Out 0 & Close UR";
  710. URC_Text_tooltip[0] = "Zooms all the way out and closes the UR window";
  711.  
  712. URC_Text[1] = "Zoom Out 2 & Close UR";
  713. 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)";
  714.  
  715. URC_Text[2] = "Zoom Out 3 & Close UR";
  716. 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)";
  717.  
  718. URC_Text_tooltip[3] = "Reload the map";
  719.  
  720. URC_Text_tooltip[4] = "Number of URs Shown on screen";
  721.  
  722. //tab names
  723. URC_Text[5] = "Comments";
  724. URC_Text[6] = "UR Filtering";
  725. URC_Text[7] = "Settings";
  726.  
  727. //UR Filtering Tab
  728. URC_Text[8] = "Click here for Instructions";
  729. URC_Text_tooltip[8] = "Instructions for UR filtering";
  730. URC_URL[8] = "https://docs.google.com/presentation/d/1zwdKAejRbnkUll5YBfFNrlI2I3Owmb5XDIbRAf47TVU/";
  731.  
  732. URC_Text[9] = "Enable URComments UR filtering";
  733. URC_Text_tooltip[9] = "Enable or disable URComments filtering";
  734.  
  735. URC_Text[10] = "Enable UR pill counts";
  736. URC_Text_tooltip[10] = "Enable or disable the pill with UR counts";
  737.  
  738. URC_Text[12] = "Hide Waiting";
  739. URC_Text_tooltip[12] = "Only show URs that need work (hide in-between states)";
  740.  
  741. URC_Text[13] = "Only show my URs";
  742. //URC_Text_tooltip[13] = "Hide UR where there are zero comments from the logged in editor";
  743. URC_Text_tooltip[13] = "Hide URs where you have no comments";
  744.  
  745. URC_Text[14] = "Show others URs past reminder + close";
  746. URC_Text_tooltip[14] = "Show URs that other commented on that have gone past the reminder and close day settings added together";
  747.  
  748. URC_Text[15] = "Hide URs Reminder needed";
  749. URC_Text_tooltip[15] = "Hide URs where reminders are needed";
  750.  
  751. URC_Text[16] = "Hide URs user replies";
  752. URC_Text_tooltip[16] = "Hide UR with user replies";
  753.  
  754. URC_Text[17] = "Hide URs close needed";
  755. URC_Text_tooltip[17] = "Hide URs that need closing";
  756.  
  757. URC_Text[18] = "Hide URs no comments";
  758. URC_Text_tooltip[18] = "Hide URs that have zero comments";
  759.  
  760. URC_Text[19] = "hide 0 comments without descriptions";
  761. URC_Text_tooltip[19] = "Hide URs that do not have descriptions or comments";
  762.  
  763. URC_Text[20] = "hide 0 comments with descriptions";
  764. URC_Text_tooltip[20] = "Hide URs that have descriptions and zero comments";
  765.  
  766. URC_Text[21] = "Hide Closed URs";
  767. URC_Text_tooltip[21] = "Hide closed URs";
  768.  
  769. URC_Text[22] = "Hide Tagged URs";
  770. URC_Text_tooltip[22] = "Hide URs that are tagged with URO+ style tags ex. [NOTE]";
  771.  
  772. URC_Text[23] = "Reminder days: ";
  773. //URC_Text_tooltip[23] = "";
  774.  
  775. URC_Text[24] = "Close days: ";
  776. //URC_Text_tooltip[] = "";
  777.  
  778. //settings tab
  779. URC_Text[25] = "Auto set new UR comment";
  780. URC_Text_tooltip[25] = "Auto set the UR comment on new URs that do not already have comments";
  781.  
  782. URC_Text[26] = "Auto set reminder UR comment";
  783. URC_Text_tooltip[26] = "Auto set the UR reminder comment for URs that are older than reminder days setting and have only one comment";
  784.  
  785. URC_Text[27] = "Auto zoom in on new UR";
  786. URC_Text_tooltip[27] = "Auto zoom in when opening URs with no comments and when sending UR reminders";
  787.  
  788. URC_Text[28] = "Auto center on UR";
  789. URC_Text_tooltip[28] = "Auto Center the map at the current map zoom when UR has comments and the zoom is less than 3";
  790.  
  791. URC_Text[29] = "Auto click open, solved, not identified";
  792. 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";
  793.  
  794. URC_Text[30] = "Auto save after a solved or not identified comment";
  795. 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";
  796.  
  797. URC_Text[31] = "Auto close comment window";
  798. 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";
  799.  
  800. URC_Text[32] = "Auto reload map after comment";
  801. 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";
  802.  
  803. URC_Text[33] = "Auto zoom out after comment";
  804. 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";
  805.  
  806. URC_Text[34] = "Auto switch to the UrComments tab";
  807. 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";
  808.  
  809. URC_Text[35] = "Close message - double click link (auto send)";
  810. 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";
  811.  
  812. URC_Text[36] = "All comments - double click link (auto send)";
  813. 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";
  814.  
  815. URC_Text[37] = "Comment List";
  816. 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";
  817.  
  818. URC_Text[38] = "Disable done / next buttons";
  819. URC_Text_tooltip[38] = "Disable the done / next buttons at the bottom of the new UR window";
  820.  
  821. URC_Text[39] = "Unfollow UR after send";
  822. URC_Text_tooltip[39] = "Unfollow UR after sending comment";
  823.  
  824. URC_Text[40] = "Auto send reminders";
  825. URC_Text_tooltip[40] = "Auto send reminders to my UR as they are on screen";
  826.  
  827. URC_Text[41] = "Replace tag name with editor name";
  828. 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 adds when commenting) replace the tag type with the editors name";
  829.  
  830. URC_Text[42] = "(Double Click)"; //double click to close links
  831. URC_Text_tooltip[42] = "Double click here to auto send - ";
  832.  
  833. URC_Text[43] = "Dont show tag name on pill";
  834. URC_Text_tooltip[43] = "Dont show tag name on pill where there is a URO tag";
  835.  
  836. 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: ";
  837.  
  838. URC_USER_PROMPT[1] = "URComments - You are missing the following items from your custom comment list: ";
  839.  
  840. 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/";
  841.  
  842. URC_USER_PROMPT[3] = "URComments you can not set close days to zero";
  843.  
  844. URC_USER_PROMPT[4] = "URComments - To use the double click links you must have the Auto click open, solved, not identified option enabled";
  845.  
  846. URC_USER_PROMPT[5] = "URComments - Aborting FilterURs2 because both filtering, counts, and auto reminders are disabled";
  847.  
  848. 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
  849.  
  850. 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
  851.  
  852. 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
  853.  
  854. 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.";
  855.  
  856. 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
  857.  
  858. 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
  859.  
  860. //end CommentTeam's list
  861.  
  862.  
  863.  
  864. } else if (SelectedBoilerPlateCreator === "LoadingSelected") {
  865.  
  866. URCommentsArray = [
  867. "Attempting to load the " + prevSelectedBoilerPlateCreator + " comments file!\n\nPlease wait.\n",
  868. "",
  869. ""
  870. ];
  871.  
  872. //auto insertion config:
  873. //the position in the list that the reminder message is at. (counting titles, comments, and ur status)
  874. ReminderPosistion = 24;
  875.  
  876. //the position of the close as Not Identified message that you have in the list (the first comment is the list is 0)
  877. CloseNotIdentifiedPosistion = 27;
  878.  
  879. //Waze's default URs number to name conversion array
  880. //Thanks to SuperMedic
  881.  
  882. def_names[6] = "Incorrect turn";
  883. def_names[7] = "Incorrect address";
  884. def_names[8] = "Incorrect route";
  885. def_names[9] = "Missing roundabout";
  886. def_names[10] = "General error";
  887. def_names[11] = "Turn not allowed";
  888. def_names[12] = "Incorrect junction";
  889. def_names[13] = "Missing bridge overpass";
  890. def_names[14] = "Wrong driving direction";
  891. def_names[15] = "Missing Exit";
  892. def_names[16] = "Missing Road";
  893. def_names[18] = "Missing Landmark";
  894. def_names[19] = "Blocked Road";
  895. def_names[21] = "Missing Street Name";
  896. def_names[22] = "Incorrect Street Prefix or Suffix";
  897. def_names[23] = "Speed Limit"; //speed limit ur type is number 23
  898.  
  899. //zoom out links
  900. URC_Text[0] = "Zoom Out 0 & Close UR";
  901. URC_Text_tooltip[0] = "Zooms all the way out and closes the UR window";
  902.  
  903. URC_Text[1] = "Zoom Out 2 & Close UR";
  904. 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)";
  905.  
  906. URC_Text[2] = "Zoom Out 3 & Close UR";
  907. 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)";
  908.  
  909. URC_Text_tooltip[3] = "Reload the map";
  910.  
  911. URC_Text_tooltip[4] = "Number of URs Shown on screen";
  912.  
  913. //tab names
  914. URC_Text[5] = "Comments";
  915. URC_Text[6] = "UR Filtering";
  916. URC_Text[7] = "Settings";
  917.  
  918. //UR Filtering Tab
  919. URC_Text[8] = "Click here for Instructions";
  920. URC_Text_tooltip[8] = "Instructions for UR filtering";
  921. URC_URL[8] = "https://docs.google.com/presentation/d/1zwdKAejRbnkUll5YBfFNrlI2I3Owmb5XDIbRAf47TVU/";
  922.  
  923. URC_Text[9] = "Enable URComments UR filtering";
  924. URC_Text_tooltip[9] = "Enable or disable URComments filtering";
  925.  
  926. URC_Text[10] = "Enable UR pill counts";
  927. URC_Text_tooltip[10] = "Enable or disable the pill with UR counts";
  928.  
  929. URC_Text[12] = "Hide Waiting";
  930. URC_Text_tooltip[12] = "Only show URs that need work (hide in-between states)";
  931.  
  932. URC_Text[13] = "Only show my URs";
  933. //URC_Text_tooltip[13] = "Hide UR where there are zero comments from the logged in editor";
  934. URC_Text_tooltip[13] = "Hide URs where you have no comments";
  935.  
  936. URC_Text[14] = "Show others URs past reminder + close";
  937. URC_Text_tooltip[14] = "Show URs that other commented on that have gone past the reminder and close day settings added together";
  938.  
  939. URC_Text[15] = "Hide URs Reminder needed";
  940. URC_Text_tooltip[15] = "Hide URs where reminders are needed";
  941.  
  942. URC_Text[16] = "Hide URs user replies";
  943. URC_Text_tooltip[16] = "Hide UR with user replies";
  944.  
  945. URC_Text[17] = "Hide URs close needed";
  946. URC_Text_tooltip[17] = "Hide URs that need closing";
  947.  
  948. URC_Text[18] = "Hide URs no comments";
  949. URC_Text_tooltip[18] = "Hide URs that have zero comments";
  950.  
  951. URC_Text[19] = "hide 0 comments without descriptions";
  952. URC_Text_tooltip[19] = "Hide URs that do not have descriptions or comments";
  953.  
  954. URC_Text[20] = "hide 0 comments with descriptions";
  955. URC_Text_tooltip[20] = "Hide URs that have descriptions and zero comments";
  956.  
  957. URC_Text[21] = "Hide Closed URs";
  958. URC_Text_tooltip[21] = "Hide closed URs";
  959.  
  960. URC_Text[22] = "Hide Tagged URs";
  961. URC_Text_tooltip[22] = "Hide URs that are tagged with URO+ style tags ex. [NOTE]";
  962.  
  963. URC_Text[23] = "Reminder days: ";
  964. //URC_Text_tooltip[23] = "";
  965.  
  966. URC_Text[24] = "Close days: ";
  967. //URC_Text_tooltip[] = "";
  968.  
  969. //settings tab
  970. URC_Text[25] = "Auto set new UR comment";
  971. URC_Text_tooltip[25] = "Auto set the UR comment on new URs that do not already have comments";
  972.  
  973. URC_Text[26] = "Auto set reminder UR comment";
  974. URC_Text_tooltip[26] = "Auto set the UR reminder comment for URs that are older than reminder days setting and have only one comment";
  975.  
  976. URC_Text[27] = "Auto zoom in on new UR";
  977. URC_Text_tooltip[27] = "Auto zoom in when opening URs with no comments and when sending UR reminders";
  978.  
  979. URC_Text[28] = "Auto center on UR";
  980. URC_Text_tooltip[28] = "Auto Center the map at the current map zoom when UR has comments and the zoom is less than 3";
  981.  
  982. URC_Text[29] = "Auto click open, solved, not identified";
  983. 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";
  984.  
  985. URC_Text[30] = "Auto save after a solved or not identified comment";
  986. 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";
  987.  
  988. URC_Text[31] = "Auto close comment window";
  989. 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";
  990.  
  991. URC_Text[32] = "Auto reload map after comment";
  992. 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";
  993.  
  994. URC_Text[33] = "Auto zoom out after comment";
  995. 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";
  996.  
  997. URC_Text[34] = "Auto switch to the UrComments tab";
  998. 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";
  999.  
  1000. URC_Text[35] = "Close message - double click link (auto send)";
  1001. 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";
  1002.  
  1003. URC_Text[36] = "All comments - double click link (auto send)";
  1004. 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";
  1005.  
  1006. URC_Text[37] = "Comment List";
  1007. 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";
  1008.  
  1009. URC_Text[38] = "Disable done / next buttons";
  1010. URC_Text_tooltip[38] = "Disable the done / next buttons at the bottom of the new UR window";
  1011.  
  1012. URC_Text[39] = "Unfollow UR after send";
  1013. URC_Text_tooltip[39] = "Unfollow UR after sending comment";
  1014.  
  1015. URC_Text[40] = "Auto send reminders";
  1016. URC_Text_tooltip[40] = "Auto send reminders to my UR as they are on screen";
  1017.  
  1018. URC_Text[41] = "Replace tag name with editor name";
  1019. 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 adds when commenting) replace the tag type with the editors name";
  1020.  
  1021. URC_Text[42] = ""; //double click to close links
  1022. URC_Text_tooltip[42] = "Double click here to auto send - ";
  1023.  
  1024. URC_Text[43] = "Dont show tag name on pill";
  1025. URC_Text_tooltip[43] = "Dont show tag name on pill where there is a URO tag";
  1026.  
  1027. 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: ";
  1028.  
  1029. URC_USER_PROMPT[1] = "URComments - You are missing the following items from your custom comment list: ";
  1030.  
  1031. 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/";
  1032.  
  1033. URC_USER_PROMPT[3] = "URComments you can not set close days to zero";
  1034.  
  1035. URC_USER_PROMPT[4] = "URComments - To use the double click links you must have the Auto click open, solved, not identified option enabled";
  1036.  
  1037. URC_USER_PROMPT[5] = "URComments - Aborting FilterURs2 because both filtering, counts, and auto reminders are disabled";
  1038.  
  1039. 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
  1040.  
  1041. 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
  1042.  
  1043. 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
  1044.  
  1045. 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.";
  1046.  
  1047. 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
  1048.  
  1049. 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
  1050.  
  1051. //end CommentTeam's list
  1052.  
  1053.  
  1054.  
  1055. //custom other languages lists from external list
  1056. } else {
  1057.  
  1058. try {
  1059.  
  1060. var CustomListError = false;
  1061. var CustomErrorListText = "";
  1062. var CustomErrorListCount = 0;
  1063.  
  1064. //custom list
  1065. URCommentsArray = eval("window.Urcomments" + SelectedBoilerPlateCreator + "Array2");
  1066.  
  1067. //the position in the list that the reminder message is at. (starting at 0 counting titles, comments, and ur status)
  1068. ReminderPosistion = eval("window.Urcomments" + SelectedBoilerPlateCreator + "ReminderPosistion");
  1069.  
  1070. //the position of the close as Not Identified message (starting at 0 counting titles, comments, and ur status)
  1071. CloseNotIdentifiedPosistion = eval("window.Urcomments" + SelectedBoilerPlateCreator + "CloseNotIdentifiedPosistion");
  1072.  
  1073. //alert(URCommentsArray[ReminderPosistion]);
  1074. //alert(URCommentsArray[CloseNotIdentifiedPosistion]);
  1075.  
  1076. //copy the waze default titles into the active ?
  1077. //Waze's default URs number to name conversion array
  1078. //Thanks to SuperMedic
  1079.  
  1080. def_names[6] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[6]"); //"Incorrect turn";
  1081. //console.log("URC: comment list error ");
  1082. def_names[7] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[7]"); //"Incorrect address";
  1083. def_names[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[8]"); //"Incorrect route";
  1084. def_names[9] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[9]"); //"Missing roundabout";
  1085. def_names[10] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[10]"); //"General error";
  1086. def_names[11] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[11]"); //"Turn not allowed";
  1087. def_names[12] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[12]"); //"Incorrect junction";
  1088. def_names[13] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[13]"); //"Missing bridge overpass";
  1089. def_names[14] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[14]"); //"Wrong driving direction";
  1090. def_names[15] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[15]"); //"Missing Exit";
  1091. def_names[16] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[16]"); //"Missing Road";
  1092. def_names[18] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[18]"); //"Missing Landmark";
  1093. def_names[19] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[19]"); //"Blocked Road";
  1094. def_names[21] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[21]"); //"Missing Street Name";
  1095. def_names[22] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[22]"); //"Incorrect Street Prefix or Suffix";
  1096. def_names[23] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "def_names[23]"); //"Speed limits";
  1097.  
  1098.  
  1099. //try {
  1100. URC_Text[0] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[0]");
  1101. URC_Text_tooltip[0] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[0]");
  1102.  
  1103. URC_Text[1] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[1]");
  1104. URC_Text_tooltip[1] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[1]");
  1105.  
  1106. URC_Text[2] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[2]");
  1107. URC_Text_tooltip[2] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[2]");
  1108.  
  1109. URC_Text[3] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[3]");
  1110. URC_Text_tooltip[3] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[3]");
  1111.  
  1112. URC_Text[4] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[4]");
  1113. URC_Text_tooltip[4] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[4]");
  1114.  
  1115. URC_Text[5] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[5]");
  1116. URC_Text_tooltip[5] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[5]");
  1117.  
  1118. URC_Text[6] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[6]");
  1119. URC_Text_tooltip[6] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[6]");
  1120.  
  1121. URC_Text[7] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[7]");
  1122. URC_Text_tooltip[7] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[7]");
  1123.  
  1124. URC_Text[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[8]");
  1125. URC_Text_tooltip[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[8]");
  1126. URC_URL[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_URL[8]");
  1127.  
  1128. URC_Text[9] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[9]");
  1129. URC_Text_tooltip[9] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[9]");
  1130.  
  1131. URC_Text[10] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[10]");
  1132. URC_Text_tooltip[10] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[10]");
  1133.  
  1134. URC_Text[11] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[11]");
  1135. URC_Text_tooltip[11] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[11]");
  1136.  
  1137. URC_Text[12] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[12]");
  1138. URC_Text_tooltip[12] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[12]");
  1139.  
  1140. URC_Text[13] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[13]");
  1141. URC_Text_tooltip[13] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[13]");
  1142.  
  1143. URC_Text[14] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[14]");
  1144. URC_Text_tooltip[14] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[14]");
  1145.  
  1146. URC_Text[15] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[15]");
  1147. URC_Text_tooltip[15] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[15]");
  1148.  
  1149. URC_Text[16] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[16]");
  1150. URC_Text_tooltip[16] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[16]");
  1151.  
  1152. URC_Text[17] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[17]");
  1153. URC_Text_tooltip[17] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[17]");
  1154.  
  1155. URC_Text[18] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[18]");
  1156. URC_Text_tooltip[18] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[18]");
  1157.  
  1158. URC_Text[19] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[19]");
  1159. URC_Text_tooltip[19] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[19]");
  1160.  
  1161. URC_Text[20] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[20]");
  1162. URC_Text_tooltip[20] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[20]");
  1163.  
  1164. URC_Text[21] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[21]");
  1165. URC_Text_tooltip[21] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[21]");
  1166.  
  1167. URC_Text[22] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[22]");
  1168. URC_Text_tooltip[22] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[22]");
  1169.  
  1170. URC_Text[23] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[23]");
  1171. URC_Text_tooltip[23] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[23]");
  1172.  
  1173. URC_Text[24] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[24]");
  1174. URC_Text_tooltip[24] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[24]");
  1175.  
  1176. URC_Text[25] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[25]");
  1177. URC_Text_tooltip[25] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[25]");
  1178.  
  1179. URC_Text[26] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[26]");
  1180. URC_Text_tooltip[26] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[26]");
  1181.  
  1182. URC_Text[27] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[27]");
  1183. URC_Text_tooltip[27] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[27]");
  1184.  
  1185. URC_Text[28] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[28]");
  1186. URC_Text_tooltip[28] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[28]");
  1187.  
  1188. URC_Text[29] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[29]");
  1189. URC_Text_tooltip[29] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[29]");
  1190.  
  1191. URC_Text[30] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[30]");
  1192. URC_Text_tooltip[30] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[30]");
  1193.  
  1194. URC_Text[31] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[31]");
  1195. URC_Text_tooltip[31] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[31]");
  1196.  
  1197. URC_Text[32] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[32]");
  1198. URC_Text_tooltip[32] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[32]");
  1199.  
  1200. URC_Text[33] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[33]");
  1201. URC_Text_tooltip[33] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[33]");
  1202.  
  1203. URC_Text[34] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[34]");
  1204. URC_Text_tooltip[34] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[34]");
  1205.  
  1206. URC_Text[35] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[35]");
  1207. URC_Text_tooltip[35] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[35]");
  1208.  
  1209. URC_Text[36] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[36]");
  1210. URC_Text_tooltip[36] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[36]");
  1211.  
  1212. URC_Text[37] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[37]");
  1213. URC_Text_tooltip[37] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[37]");
  1214.  
  1215. URC_Text[38] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[38]");
  1216. URC_Text_tooltip[38] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[38]");
  1217.  
  1218. URC_Text[39] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[39]");
  1219. URC_Text_tooltip[39] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[39]");
  1220.  
  1221. URC_Text[40] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[40]");
  1222. URC_Text_tooltip[40] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[40]");
  1223.  
  1224. URC_Text[41] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[41]");
  1225. URC_Text_tooltip[41] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[41]");
  1226.  
  1227. URC_Text[42] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[42]");
  1228. URC_Text_tooltip[42] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[42]");
  1229.  
  1230. URC_Text[43] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text[43]");
  1231. URC_Text_tooltip[43] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_Text_tooltip[43]");
  1232.  
  1233. URC_USER_PROMPT[0] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[0]");
  1234. URC_USER_PROMPT[1] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[1]");
  1235. URC_USER_PROMPT[2] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[2]");
  1236. URC_USER_PROMPT[3] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[3]");
  1237. URC_USER_PROMPT[4] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[4]");
  1238. URC_USER_PROMPT[5] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[5]");
  1239. URC_USER_PROMPT[6] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[6]");
  1240. URC_USER_PROMPT[7] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[7]");
  1241. URC_USER_PROMPT[8] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[8]");
  1242. URC_USER_PROMPT[9] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[9]");
  1243. URC_USER_PROMPT[10] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[10]");
  1244. URC_USER_PROMPT[11] = eval("window.Urcomments" + SelectedBoilerPlateCreator + "URC_USER_PROMPT[11]");
  1245.  
  1246.  
  1247. } catch (err) {
  1248. 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.");
  1249. console.error("URC: comment list error " + err);
  1250. localStorage.setItem('BoilerPlateCreators', 'CommentTeam');
  1251. $("#sidepanel-Comments").html('');
  1252. //reload the content
  1253. ChangeLanguage = true;
  1254. URComments_bootstrap();
  1255. return false;
  1256. }
  1257.  
  1258.  
  1259. }
  1260. URComments_init();
  1261. }
  1262. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1263. //////
  1264. ////// init
  1265. //////
  1266. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1267.  
  1268. function URComments_init() {
  1269. //urctoConsole("Start init 1");
  1270.  
  1271. //create the URComments object
  1272. var URComments = {};
  1273.  
  1274.  
  1275. URComments.init = function() {
  1276. //if we are changing the language do not redraw the tab
  1277. //alert(ChangeLanguage)
  1278. if (ChangeLanguage === false) {
  1279.  
  1280. //CSS
  1281. //expand the UR textarea so we can verfiy what comment we clicked on. special thanks to SeekingSerenity
  1282. 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; }';
  1283.  
  1284. var wazeheight = $(".view-area").height();
  1285. if (wazeheight > 500) {
  1286. //betaeditor commetn textarea
  1287. g = g + '.new-comment-form .new-comment-text { height: 140px !important; }';
  1288. }
  1289.  
  1290. //css for items in my tab that are in a label (uro presets)
  1291. g = g + '#sidepanel-Comments label { cursor:pointer; margin:0px 0px 0px; vertical-align: middle;font-size: 10px;}';
  1292.  
  1293. //css for checkboxes
  1294. g = g + '#sidepanel-Comments .URCommentsCheckbox { text-decoration:none; cursor:pointer; color: #000000; margin:0px 0px 0px; vertical-align: middle; font-size: 12px;}';
  1295.  
  1296. //css for our comments,
  1297. g = g + '#sidepanel-Comments .URComments { text-decoration:none; cursor:pointer; color: #000000; font-size: 12px;}'; // margin-top: 5px;
  1298.  
  1299. //css for our uro presets,
  1300. g = g + '#sidepanel-Comments .URCommentsPresets { text-decoration:none; cursor:pointer; color: #000000; font-size: 10px;}';
  1301.  
  1302. //css for our nav tabs,
  1303. g = g + '#comments-tab22 ul { font-size: 12px; padding: 0px;}';
  1304.  
  1305. //css for our nav tabs links,
  1306. g = g + '#comments-tab22 a { padding: 3px !important ; margin-right: 0px !important;}';
  1307.  
  1308. // keep the padding on our nav tabs
  1309. g = g + '#comments-tab22 nav-tabs { padding: 0px !important;}';
  1310.  
  1311. //css for non selected UR opacity
  1312. g = g + ".olMap.problem-selected .map-problem:not(.selected) { opacity: .5 !important;}";
  1313.  
  1314. //css to fix the beta editors UR window
  1315. g = g + '.problem-edit .section .title { line-height: 15px !important; }';
  1316.  
  1317. g = g + '.problem-edit .header { line-height: 15px !important; padding: 0px 15px!important; }';
  1318. g = g + '.problem-edit .section .content { padding: 5px !important;}';
  1319.  
  1320. //css to undo some of the changes from maximizer
  1321. if ($("#sidebar").width() < 300) {
  1322. g = g + '#sidebar { max-width: 290px !important;}';
  1323. g = g + '.show-sidebar .row-fluid .fluid-fixed {margin-left: 290px !important;}';
  1324. }
  1325.  
  1326. //move description up a div
  1327. g = g + '.problem-edit .description { background-color: white; overflow-x: hidden; overflow-y: auto; max-height: 80px; border-bottom: 2px solid #e9e9e9;}';
  1328.  
  1329.  
  1330. //append our css to the head
  1331. $("head").append($('<style type="text/css">' + g + '</style>'));
  1332.  
  1333. //urctoConsole("Start adding the URComments's tab");
  1334. //add comments tab
  1335. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  1336.  
  1337. //var b = $('<li><a href="#sidepanel-Comments" data-toggle="tab" id="CommentsTab"><img style="padding-bottom: 6px;" src="' + UrCommentsIcon + '" width="18px" /></img>URC</a> </li> ');
  1338. // dBsooner - 11/21/2018 - END
  1339.  
  1340. //rickzabel 11/27/2018 took the logo out of the tab and put it next to the zoom out links instead of above them
  1341. var b = $('<li><a href="#sidepanel-Comments" data-toggle="tab" id="CommentsTab">URC</a> </li> ');
  1342. //rickzabel 11/27/2018
  1343.  
  1344.  
  1345. //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!
  1346. //$("h2 + ul.nav-tabs").first().append(b);
  1347. $("#user-info ul.nav-tabs").first().append(b);//production 10/29/2015
  1348. $("#user-tabs ul.nav-tabs").first().append(b);//beta 10/29/2015
  1349.  
  1350. var c = "";
  1351. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  1352. //c = c + '<div class="tab-pane" id="sidepanel-Comments" >';
  1353. c = c + '<div class="tab-pane" id="sidepanel-Comments" style="width:295px;">';
  1354. // dBsooner - 11/21/2018 - END
  1355. $("#user-info div.tab-content").first().append(c);//production 10/29/2015
  1356. $("#user-tabs div.tab-content").first().append(c);//beta 10/29/2015
  1357.  
  1358.  
  1359.  
  1360. }
  1361. //reset the var to change the language
  1362. ChangeLanguage = false;
  1363.  
  1364. //add the content to the comments tab
  1365. //Comment tab header and zoom out button
  1366. var c = "";
  1367. c = c + '<div class="URComments"></div></div>';
  1368. //$("#sidepanel-Comments").first().append(c);//production 10/29/2015
  1369. $("#sidepanel-Comments").first().append(c);//beta 10/29/2015
  1370.  
  1371.  
  1372. var c = "";
  1373. c = c + '<div class="row middle-xs" style="margin-right: 80px!important; margin-left: 80px!important;">';
  1374.  
  1375.  
  1376.  
  1377. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  1378.  
  1379.  
  1380.  
  1381.  
  1382. // c = c + '<div class="colxs-6" style= " width: 200px;"><div style=""><img src="' + UrCommentsIcon + '" style="cursor:default;"><div id="URCWazeReloadMap" title="' + URC_Text_tooltip[3] + '" data-original-title="" class="fa fa-repeat reload-button reload-button URComments" content="" style="font-size: 25px; position: relative; top: 10px; right: -63px;"></div>'// position: relative !important; left: 64px !important;
  1383.  
  1384.  
  1385. c = c + '<div class="colxs-6" style= " width: 200px;"><div style="">';
  1386.  
  1387. c = c + '<div style="height:0px; position:relative; top:-3px; left:-60px;"><img src="' + UrCommentsIcon + '" style="cursor:default;"></div>'// position: relative !important; left: 64px !important;
  1388.  
  1389.  
  1390.  
  1391. //c = c + '<div class="colxs-6" style= " width: 200px;">'; //rz
  1392. // dBsooner - 11/21/2018 - END
  1393. c = c + '<div class="box">';
  1394. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  1395. // c = c + '<br>';
  1396. // dBsooner - 11/21/2018 - END
  1397.  
  1398.  
  1399.  
  1400.  
  1401. c = c + '<a id="URCommentZoomOutButton" class="URComments" Title="' + URC_Text_tooltip[0] + '">' + URC_Text[0] + '</a>';
  1402. c = c + '<br>';
  1403. c = c + '<a id="URCommentZoomOutButton2" class="URComments" Title="' + URC_Text_tooltip[1] + '">' + URC_Text[1] + '</a>';
  1404. c = c + '<br>';
  1405. c = c + '<a id="URCommentZoomOutButton3" class="URComments" Title="' + URC_Text_tooltip[2] + '">' + URC_Text[2] + '</a>';
  1406. c = c + '<div Title="' + URC_Text_tooltip[4] + '" id="URCount" style="font-size: 12px; width: 75%; text-align:center;"></div>';
  1407. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  1408. // c = c + '</div>';
  1409. // dBsooner - 11/21/2018 - END
  1410. c = c + '</div>';
  1411. c = c + '</div> ';
  1412. $(".URComments").append(c);
  1413.  
  1414. //add the map zoom out handlers
  1415. $("#URCommentZoomOutButton").click(URComments.SetZoomCloseUR(0, "CloseUR"));
  1416. //$("#URCommentZoomOutButton").click(URComments.SetZoomCloseUR(1, "CloseUR"));
  1417. $("#URCommentZoomOutButton2").click(URComments.SetZoomCloseUR(2, "CloseUR"));
  1418. $("#URCommentZoomOutButton3").click(URComments.SetZoomCloseUR(3, "CloseUR"));
  1419.  
  1420. //add the map reload handler
  1421. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  1422. // $("#URCWazeReloadMap").click(URComments.AutoReloadMapOnComment); // removed by dB 11/21/2018 with changes for moving icon to tab title and removing the icon / refresh icon in the pane itself.
  1423. // dBsooner - 11/21/2018 - END
  1424.  
  1425. c = '<div id="comments-tab22" class="active" style="padding-top: 0px;">';
  1426. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  1427. // c = c + ' <ul class="nav nav-tabs">';
  1428. c = c + ' <ul class="nav nav-tabs" style="justify-content:center;">';
  1429. // dBsooner - 11/21/2018 - END
  1430. c = c + ' <li class="active"><a data-toggle="tab" href="#sidepanel-URComments-list">' + URC_Text[5] + '</a></li>';
  1431. c = c + ' <li><a data-toggle="tab" href="#sidepanel-URComments-URO-Presets">' + URC_Text[6] + '</a></li>';
  1432. c = c + ' <li><a data-toggle="tab" href="#sidepanel-URComments-settings">' + URC_Text[7] + '</a></li>';
  1433. c = c + ' </ul>';
  1434. c = c + ' <div class="tab-content">'; // style="padding: 10px 1px 1px 10px !important;"
  1435. c = c + ' <div class="tab-pane active" id="sidepanel-URComments-list">';
  1436. c = c + ' </div>';
  1437. c = c + ' <div class="tab-pane" id="sidepanel-URComments-URO-Presets">';
  1438. c = c + ' </div>';
  1439. c = c + ' <div class="tab-pane" id="sidepanel-URComments-settings">';
  1440. c = c + ' </div>';
  1441. c = c + ' </div>';
  1442. c = c + '</div>';
  1443.  
  1444. //add the sub tabs to the scripts main tab
  1445. $("#sidepanel-Comments").append(c);
  1446.  
  1447. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1448. //////
  1449. ////// Comments
  1450. //////
  1451. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1452.  
  1453. d = $('<a target="_blank" Title="' + URC_Text_tooltip[8] + '" href="' + URC_URL[8] + '">' + URC_Text[8] + '<a/><br><br>');
  1454. $("#sidepanel-URComments-URO-Presets").append(d);
  1455.  
  1456. //enable or disable urc filtering URCommentsFilterEnabled
  1457. d = $('<label Title="' + URC_Text_tooltip[9] + '"><input type="checkbox" id="URCommentsFilterEnabled" class="URCommentsCheckbox"> ' + URC_Text[9] + '</input></label><br>');
  1458. //$("#sidepanel-URComments-list").append(d);
  1459. $("#sidepanel-URComments-URO-Presets").append(d);
  1460. $("#URCommentsFilterEnabled").click(function() {
  1461. $(localStorage.setItem('URCommentsFilterEnabled', URCommentsFilterEnabled.checked));
  1462.  
  1463. //if(URCommentsFilterEnabled.checked == true){
  1464. setTimeout(URComments.FilterURs('filterenabled'), 0);
  1465. //}
  1466. });
  1467.  
  1468. var avdd = localStorage.getItem('URCommentsFilterEnabled');
  1469. if (avdd === null) {
  1470. avdd = true;
  1471. }
  1472. $("#URCommentsFilterEnabled").prop('checked', eval(avdd));
  1473.  
  1474. //enable or disable ur pill counts
  1475. d = $('<label Title="' + URC_Text_tooltip[10] + '"><input type="checkbox" id="URCommentsPillEnabled" class="URCommentsCheckbox"> ' + URC_Text[10] + '</input></label><br><br>');
  1476. //$("#sidepanel-URComments-list").append(d);
  1477. $("#sidepanel-URComments-URO-Presets").append(d);
  1478. $("#URCommentsPillEnabled").click(function() {
  1479. $(localStorage.setItem('URCommentsPillEnabled', URCommentsPillEnabled.checked));
  1480.  
  1481. //if(URCommentsPillEnabled.checked == true){
  1482. setTimeout(URComments.FilterURs('filterenabled'), 0);
  1483. //}
  1484. });
  1485.  
  1486. var avdd = localStorage.getItem('URCommentsPillEnabled');
  1487. if (avdd === null) {
  1488. avdd = true;
  1489. }
  1490. $("#URCommentsPillEnabled").prop('checked', eval(avdd));
  1491.  
  1492. //hide inbetween ur
  1493. d = $('<label Title="' + URC_Text_tooltip[12] + '"><input type="checkbox" id="URCommentsHideInbetween" class="URCommentsCheckbox"> ' + URC_Text[12] + '</input></label><br>');
  1494. //$("#sidepanel-URComments-list").append(d);
  1495. $("#sidepanel-URComments-URO-Presets").append(d);
  1496. $("#URCommentsHideInbetween").click(function() {
  1497. $(localStorage.setItem('URCommentsHideInbetween', URCommentsHideInbetween.checked));
  1498. setTimeout(URComments.FilterURs('hideInbetween'), 0);
  1499. });
  1500.  
  1501. var avdd = localStorage.getItem('URCommentsHideInbetween');
  1502. if (avdd === null) {
  1503. avdd = true;
  1504. }
  1505. $("#URCommentsHideInbetween").prop('checked', eval(avdd));
  1506.  
  1507. //hide UR that are not "mine"
  1508. d = $('<label Title="' + URC_Text_tooltip[13] + '"><input type="checkbox" id="URCommentsHideNotMyUR" class="URCommentsCheckbox"> ' + URC_Text[13] + '</input></label><br>');
  1509. //$("#sidepanel-URComments-list").append(d);
  1510. $("#sidepanel-URComments-URO-Presets").append(d);
  1511. $("#URCommentsHideNotMyUR").click(function() {
  1512. $(localStorage.setItem('URCommentsHideNotMyUR', URCommentsHideNotMyUR.checked));
  1513. setTimeout(URComments.FilterURs('URCommentsHideNotMyUR'), 0);
  1514. });
  1515.  
  1516. var avdd = localStorage.getItem('URCommentsHideNotMyUR');
  1517. if (avdd === null) {
  1518. avdd = true;
  1519. }
  1520. $("#URCommentsHideNotMyUR").prop('checked', eval(avdd));
  1521.  
  1522. //show UR that have gone past the close day setting
  1523. d = $('<label Title="' + URC_Text_tooltip[14] + '"><input type="checkbox" id="URCommentsShowPastClose" class="URCommentsCheckbox"> ' + URC_Text[14] + '</input></label><br>');
  1524. //$("#sidepanel-URComments-list").append(d);
  1525. $("#sidepanel-URComments-URO-Presets").append(d);
  1526. $("#URCommentsShowPastClose").click(function() {
  1527. $(localStorage.setItem('URCommentsShowPastClose', URCommentsShowPastClose.checked));
  1528. setTimeout(URComments.FilterURs('URCommentsShowPastClose'), 0);
  1529. });
  1530.  
  1531. var avdd = localStorage.getItem('URCommentsShowPastClose');
  1532. if (avdd === null) {
  1533. avdd = true;
  1534. }
  1535. $("#URCommentsShowPastClose").prop('checked', eval(avdd));
  1536.  
  1537. //hide reminders
  1538. d = $('<label Title="' + URC_Text_tooltip[15] + '"><input type="checkbox" id="URCommentsHideReminderNeeded" class="URCommentsCheckbox"> ' + URC_Text[15] + '</input></label><br><br>');
  1539. //$("#sidepanel-URComments-list").append(d);
  1540. $("#sidepanel-URComments-URO-Presets").append(d);
  1541. $("#URCommentsHideReminderNeeded").click(function() {
  1542. $(localStorage.setItem('URCommentsHideReminderNeeded', URCommentsHideReminderNeeded.checked));
  1543. setTimeout(URComments.FilterURs('URCommentsHideReminderNeeded'), 0);
  1544. });
  1545.  
  1546. var avdd = localStorage.getItem('URCommentsHideReminderNeeded');
  1547. if (avdd === null) {
  1548. avdd = false;
  1549. }
  1550. $("#URCommentsHideReminderNeeded").prop('checked', eval(avdd));
  1551.  
  1552. //hide replies
  1553. d = $('<label Title="' + URC_Text_tooltip[16] + '"><input type="checkbox" id="URCommentsHideReplies" class="URCommentsCheckbox"> ' + URC_Text[16] + '</input></label><br>');
  1554. //$("#sidepanel-URComments-list").append(d);
  1555. $("#sidepanel-URComments-URO-Presets").append(d);
  1556. $("#URCommentsHideReplies").click(function() {
  1557. $(localStorage.setItem('URCommentsHideReplies', URCommentsHideReplies.checked));
  1558. setTimeout(URComments.FilterURs('URCommentsHideReplies'), 0);
  1559. });
  1560.  
  1561. var avdd = localStorage.getItem('URCommentsHideReplies');
  1562. if (avdd === null) {
  1563. avdd = false;
  1564. }
  1565. $("#URCommentsHideReplies").prop('checked', eval(avdd));
  1566.  
  1567. //hide older than 7 day
  1568. d = $('<label Title="' + URC_Text_tooltip[17] + '"><input type="checkbox" id="URCommentsHideCloseNeeded" class="URCommentsCheckbox"> ' + URC_Text[17] + '</input></label><br>');
  1569. //$("#sidepanel-URComments-list").append(d);
  1570. $("#sidepanel-URComments-URO-Presets").append(d);
  1571. $("#URCommentsHideCloseNeeded").click(function() {
  1572. $(localStorage.setItem('URCommentsHideCloseNeeded', URCommentsHideCloseNeeded.checked));
  1573. setTimeout(URComments.FilterURs('URCommentsHideCloseNeeded'), 0);
  1574. });
  1575.  
  1576. var avdd = localStorage.getItem('URCommentsHideCloseNeeded');
  1577. if (avdd === null) {
  1578. avdd = false;
  1579. }
  1580. $("#URCommentsHideCloseNeeded").prop('checked', eval(avdd));
  1581.  
  1582. //hide initial (zero comments)
  1583. d = $('<label Title="' + URC_Text_tooltip[18] + '"><input type="checkbox" id="URCommentsHideInital" class="URCommentsCheckbox"> ' + URC_Text[18] + '</input></label><br>');
  1584. //$("#sidepanel-URComments-list").append(d);
  1585. $("#sidepanel-URComments-URO-Presets").append(d);
  1586. $("#URCommentsHideInital").click(function() {
  1587. $(localStorage.setItem('URCommentsHideInital', URCommentsHideInital.checked));
  1588. setTimeout(URComments.FilterURs('URCommentsHideInital'), 0);
  1589. });
  1590.  
  1591. var avdd = localStorage.getItem('URCommentsHideInital');
  1592. if (avdd === null) {
  1593. avdd = false;
  1594. }
  1595. $("#URCommentsHideInital").prop('checked', eval(avdd));
  1596.  
  1597. //Hide UR that do not have descriptions
  1598. d = $('<label Title="' + URC_Text_tooltip[19] + '"><input type="checkbox" id="URCommentsHideWithoutDescript" class="URCommentsCheckbox"> ' + URC_Text[19] + '</input></label><br>');
  1599. //$("#sidepanel-URComments-list").append(d);
  1600. $("#sidepanel-URComments-URO-Presets").append(d);
  1601. $("#URCommentsHideWithoutDescript").click(function() {
  1602. $(localStorage.setItem('URCommentsHideWithoutDescript', URCommentsHideWithoutDescript.checked));
  1603. setTimeout(URComments.FilterURs('HideWithoutDescript'), 0);
  1604. });
  1605.  
  1606. var avdd = localStorage.getItem('URCommentsHideWithoutDescript');
  1607. if (avdd === null) {
  1608. avdd = false;
  1609. }
  1610. $("#URCommentsHideWithoutDescript").prop('checked', eval(avdd));
  1611.  
  1612. //Hide UR that have descriptions
  1613. d = $('<label Title="' + URC_Text_tooltip[20] + '"><input type="checkbox" id="URCommentsHideWithDescript" class="URCommentsCheckbox"> ' + URC_Text[20] + '</input></label><br>');
  1614. //$("#sidepanel-URComments-list").append(d);
  1615. $("#sidepanel-URComments-URO-Presets").append(d);
  1616. $("#URCommentsHideWithDescript").click(function() {
  1617. $(localStorage.setItem('URCommentsHideWithDescript', URCommentsHideWithDescript.checked));
  1618. setTimeout(URComments.FilterURs('HideWithDescript'), 0);
  1619. });
  1620.  
  1621. var avdd = localStorage.getItem('URCommentsHideWithDescript');
  1622. if (avdd === null) {
  1623. avdd = false;
  1624. }
  1625. $("#URCommentsHideWithDescript").prop('checked', eval(avdd));
  1626.  
  1627. //hide closed
  1628. d = $('<label Title="' + URC_Text_tooltip[21] + '"><input type="checkbox" id="URCommentsHideClosed" class="URCommentsCheckbox"> ' + URC_Text[21] + '</input></label><br>');
  1629. //$("#sidepanel-URComments-list").append(d);
  1630. $("#sidepanel-URComments-URO-Presets").append(d);
  1631. $("#URCommentsHideClosed").click(function() {
  1632. $(localStorage.setItem('URCommentsHideClosed', URCommentsHideClosed.checked));
  1633. setTimeout(URComments.FilterURs('URCommentsHideClosed'), 0);
  1634. });
  1635.  
  1636. var avdd = localStorage.getItem('URCommentsHideClosed');
  1637. if (avdd === null) {
  1638. avdd = true;
  1639. }
  1640. $("#URCommentsHideClosed").prop('checked', eval(avdd));
  1641.  
  1642. //hide notes
  1643. d = $('<label Title="' + URC_Text_tooltip[22] + '"><input type="checkbox" id="URCommentsHideNotes" class="URCommentsCheckbox"> ' + URC_Text[22] + '</input></label><br><br>');
  1644. //$("#sidepanel-URComments-list").append(d);
  1645. $("#sidepanel-URComments-URO-Presets").append(d);
  1646. $("#URCommentsHideNotes").click(function() {
  1647. $(localStorage.setItem('URCommentsHideNotes', URCommentsHideNotes.checked));
  1648. setTimeout(URComments.FilterURs('URCommentsHideNotes'), 0);
  1649. });
  1650.  
  1651. var avdd = localStorage.getItem('URCommentsHideNotes');
  1652. if (avdd === null) {
  1653. avdd = false;
  1654. }
  1655. $("#URCommentsHideNotes").prop('checked', eval(avdd));
  1656.  
  1657. //days used to filter UR (reminder days / close days)
  1658. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  1659. // 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>');
  1660. 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>');
  1661. // dBsooner - 11/21/2018 - END
  1662. $("#sidepanel-URComments-URO-Presets").append(d);
  1663.  
  1664. //load reminder days
  1665. $('#ReminderDays').val(localStorage.getItem('ReminderDays'));
  1666. //load close days
  1667. $('#CloseDays').val(localStorage.getItem('CloseDays'));
  1668. //on load validation
  1669. if ($('#ReminderDays').val() < 0) { //|| $('#ReminderDays').val() >= $('#CloseDays').val()
  1670. $('#ReminderDays').val('0');
  1671. $(localStorage.setItem('ReminderDays', $('#ReminderDays').val()));
  1672. }
  1673. if ($('#CloseDays').val() < 1) { // || $('#CloseDays').val() <= $('#ReminderDays').val()
  1674. $('#CloseDays').val('7');
  1675. $(localStorage.setItem('CloseDays', $('#CloseDays').val()));
  1676. }
  1677.  
  1678. //reminder days verification
  1679. $("#ReminderDays").change(function() {
  1680. $(localStorage.setItem('ReminderDays', $('#ReminderDays').val()));
  1681. setTimeout(URComments.FilterURs('ReminderDaysChange'), 0);
  1682. });
  1683.  
  1684. //close days verification
  1685. $("#CloseDays").change(function() {
  1686. if ($('#CloseDays').val() < 1) { //|| $('#CloseDays').val() <= $('#ReminderDays').val()
  1687. $('#CloseDays').val('7');
  1688. alert(URC_USER_PROMPT[3]); //"URComments you can not set close days to zero days";
  1689. } else {
  1690. //save
  1691. $(localStorage.setItem('CloseDays', $('#CloseDays').val()));
  1692. setTimeout(URComments.FilterURs('CloseDaysChange'), 0);
  1693. }
  1694. });
  1695.  
  1696. //start generating the comment list and mouse click handlers
  1697. //urctoConsole("Start adding comments to the comment tab");
  1698. //comments setup
  1699. d = "";
  1700.  
  1701. //CurrentIndex is used to keep count of total arrays pairs which is used on the div's id tags
  1702. var CurrentIndex = 1;
  1703. //urctoConsole("Create Div 1");
  1704.  
  1705. //setup the comment color var
  1706. var colorrr = "CC0000";
  1707. var Title = "";
  1708. var URCommentURLNote = "";
  1709. var SelectedBoilerPlateCreator = localStorage.getItem('BoilerPlateCreators');
  1710. //go over the array and generate comment divs
  1711. for (var i = 0; i < URCommentsArray.length; i = i + 3) {
  1712. //urctoConsole("Create div for - " + URCommentsArray[i] + " " + URCommentsArray[i + 2]);
  1713.  
  1714. // make the URStatus lower case
  1715. var URStatus = (URCommentsArray[i + 2]).toLowerCase();
  1716.  
  1717. if (URStatus === "open") {
  1718. //black
  1719. colorrr = "#000000";
  1720. } else if (URStatus === "solved") {
  1721. //green
  1722. colorrr = "#008F00";
  1723. } else if (URStatus === "notidentified") {
  1724. //orange
  1725. colorrr = "#E68A00";
  1726. } else {
  1727. //red - not defined and that is a problem
  1728. colorrr = "#CC0000";
  1729.  
  1730. }
  1731. //escaping titles and comments with escapeHtml(Comment) so we can display items with special char as html;
  1732. //generate the comment links
  1733.  
  1734. Title = URCommentsArray[i];
  1735. var Comment = URComments.escapeHtml(URCommentsArray[i + 1]);
  1736.  
  1737. //normal comment link
  1738. d = '<div><a id="URComments-comment' + CurrentIndex + '" class="URComments" style="color:' + colorrr + '" Title="Title: ' + Title + ' Action: ' + URStatus + '; Comment: ' + Comment + ' ">' + Title + '</a>';
  1739. //$("#sidepanel-Comments").append(d);
  1740.  
  1741. if (URCommentsArray[i] === URCommentsArray[CloseNotIdentifiedPosistion] && localStorage.getItem('DBLClk7DCAutoSend') == "yes" || localStorage.getItem('DBLClkAll') == "yes") {
  1742. if (URCommentsArray[i] !== "<br>") {
  1743. 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
  1744.  
  1745. }
  1746. }
  1747.  
  1748. d = d + '</div>';
  1749.  
  1750. //add comment to list
  1751. $("#sidepanel-URComments-list").append(d);
  1752.  
  1753. //set urID to zero so we don't freak out the functions expecting a UR ID
  1754. urID = 0;
  1755.  
  1756. //create the click function for each comment
  1757. $("#URComments-comment" + CurrentIndex).click(URComments.AutoZoomIN(URCommentsArray[i], URCommentsArray[i + 1], URStatus, urID));
  1758.  
  1759. //create the double click function for each comment
  1760. if (URCommentsArray[i] !== "<br>" && URCommentsArray[i] === URCommentsArray[CloseNotIdentifiedPosistion] && localStorage.getItem('DBLClk7DCAutoSend') == "yes" || localStorage.getItem('DBLClkAll') == "yes") {
  1761. //use this to click send automatically
  1762. if (URCommentsArray[i] !== "<br>") {
  1763. $("#URComments-commentDBLCLK" + CurrentIndex).dblclick(URComments.AutoZoomIN(URCommentsArray[i], URCommentsArray[i + 1], URStatus, urID, "AutoSendComment"));
  1764. }
  1765.  
  1766. }
  1767.  
  1768. //add a keyboardshortcut for each comment
  1769. if (URCommentsArray[i] !== "<br>") {
  1770. //WMEKSRegisterKeyboardShortcut('URC' + SelectedBoilerPlateCreator, 'URComments ' + SelectedBoilerPlateCreator, 'URC' + SelectedBoilerPlateCreator + 'Shortcut'+i, URCommentsArray[i], URComments.AutoZoomIN(URCommentsArray[i], URCommentsArray[i + 1], URStatus, urID), '-1'); //shortcut1
  1771. }
  1772.  
  1773. //inc the CurrentIndex
  1774. CurrentIndex++;
  1775. }
  1776.  
  1777. //add 2 br to the end of the list for lower resolution monitors
  1778. d = '<br><br>';
  1779. $("#sidepanel-URComments-list").append(d);
  1780.  
  1781. //load the saved keyboard shortcuts
  1782. WMEKSLoadKeyboardShortcuts('URC' + SelectedBoilerPlateCreator);
  1783. //before unloading WME save the keyboard shortcuts
  1784. window.addEventListener("beforeunload", function() {
  1785. WMEKSSaveKeyboardShortcuts('URC' + SelectedBoilerPlateCreator);
  1786. }, false);
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1799. //////
  1800. ////// URO+ Preset filters
  1801. //////
  1802. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1803.  
  1804. //urctoConsole("Start adding URO preset filters to the comment tab");
  1805.  
  1806. /*
  1807. //URO+ new ur with no description
  1808. 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>');
  1809. $("#sidepanel-URComments-URO-Presets").append(d);
  1810. $("#URONewNoDescription").click(URComments.UROClearClicked('URONewNoDescription'));
  1811.  
  1812. //URO+ new ur
  1813. 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>');
  1814. $("#sidepanel-URComments-URO-Presets").append(d);
  1815. $("#URCommentURONEW").click(URComments.UROClearClicked('UroShowNew'));
  1816.  
  1817. //show no responses for reminders
  1818. 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>');
  1819. $("#sidepanel-URComments-URO-Presets").append(d);
  1820. //create the callback function
  1821. $("#URCommentURO4DayFollowUp").click(URComments.UROClearClicked('URO4DayFollowUp'));
  1822.  
  1823. //show no responses for 7 days needs closing
  1824. 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>');
  1825. $("#sidepanel-URComments-URO-Presets").append(d);
  1826. //create the callback function
  1827. $("#URCommentURO7Day").click(URComments.UROClearClicked('URO7Day'));
  1828.  
  1829. //show no responses for 8 days needs closing
  1830. 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>');
  1831. $("#sidepanel-URComments-URO-Presets").append(d);
  1832. //create the callback function
  1833. $("#URCommentURO8Day").click(URComments.UROClearClicked('URO8Day'));
  1834.  
  1835. //show no responses for 10 days needs closing
  1836. 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>');
  1837. $("#sidepanel-URComments-URO-Presets").append(d);
  1838. //create the callback function
  1839. $("#URCommentURO10Day").click(URComments.UROClearClicked('URO10Day'));
  1840.  
  1841. //show no responses for 24 Hour Notice now needs closing
  1842. 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>');
  1843. $("#sidepanel-URComments-URO-Presets").append(d);
  1844. //create the callback function
  1845. $("#URCommentURO24Hr").click(URComments.UROClearClicked('URO24Hr'));
  1846. */
  1847. //URO+ clear
  1848. //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>');
  1849. //$("#sidepanel-URComments-URO-Presets").append(d);
  1850. //create the callback function
  1851. //$("#URCommentUROclearUROFiltrs").click(URComments.UROClearClicked('UROclearUROFiltrs'));
  1852.  
  1853. /*
  1854. //the predefined presets only show comments that the current user has commented on
  1855. 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>');
  1856. $("#sidepanel-URComments-URO-Presets").append(d);
  1857. //create the callback function
  1858. $("#URCommentUROOnlyMyUR").click(URComments.OnlyMyUR);
  1859.  
  1860. //the predefined presets only show comments that the current user has commented on
  1861. 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>');
  1862. $("#sidepanel-URComments-URO-Presets").append(d);
  1863. //create the callback function
  1864. $("#URCommentUROHideTagged").click(URComments.HideTagged("trash"));
  1865. */
  1866.  
  1867. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1868. //////
  1869. ////// Draw Options
  1870. //////
  1871. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1872.  
  1873. //Auto Set ur comment on new URs
  1874. d = $('<label Title="' + URC_Text_tooltip[25] + '"><input type="checkbox" id="UrCommentAutoSetNewComment" class="URCommentsCheckbox"> ' + URC_Text[25] + '</input></label><br>');
  1875. $("#sidepanel-URComments-settings").append(d);
  1876. //create the callback function
  1877. $("#UrCommentAutoSetNewComment").click(URComments.AutoSetNewComment);
  1878.  
  1879. //Auto Set ur reminder on new URs
  1880. d = $('<label Title="' + URC_Text_tooltip[26] + '"><input type="checkbox" id="UrCommentAutoSet4dayComment" class="URCommentsCheckbox"> ' + URC_Text[26] + '</input></label><br>');
  1881. $("#sidepanel-URComments-settings").append(d);
  1882. //create the callback function
  1883. $("#UrCommentAutoSet4dayComment").click(URComments.UrCommentAutoSet4dayComment);
  1884.  
  1885. //auto zoom in for new with no comments
  1886. d = $('<label Title="' + URC_Text_tooltip[27] + '"><input type="checkbox" id="UrCommentNewZoomIn" class="URCommentsCheckbox"> ' + URC_Text[27] + '</input></label><br>');
  1887. $("#sidepanel-URComments-settings").append(d);
  1888. //create the callback function
  1889. $("#UrCommentNewZoomIn").click(URComments.NewZoomIn);
  1890.  
  1891. //auto center at current zoom for UR with comments
  1892. d = $('<label Title="' + URC_Text_tooltip[28] + '"><input type="checkbox" id="UrCommentWithCommentRecenter" class="URCommentsCheckbox"> ' + URC_Text[28] + '</input></label><br>');
  1893. $("#sidepanel-URComments-settings").append(d);
  1894. //create the callback function
  1895. $("#UrCommentWithCommentRecenter").click(URComments.WithCommentRecenter);
  1896.  
  1897. //Auto Click open solved not Identified
  1898. d = $('<label Title="' + URC_Text_tooltip[29] + '"><input type="checkbox" id="URCommentAutoClickURStatus" class="URCommentsCheckbox"> ' + URC_Text[29] + '</input></label><br>');
  1899. $("#sidepanel-URComments-settings").append(d);
  1900. //create the callback function
  1901. $("#URCommentAutoClickURStatus").click(URComments.AutoClickURStatus);
  1902.  
  1903. //UrCommentSaveAfterComment
  1904. d = $('<label Title="' + URC_Text_tooltip[30] + '"><input type="checkbox" id="UrCommentSaveAfterComment" class="URCommentsCheckbox"> ' + URC_Text[30] + '</input></label><br>');
  1905. $("#sidepanel-URComments-settings").append(d);
  1906. //create the callback function
  1907. $("#UrCommentSaveAfterComment").click(URComments.SaveAfterComment);
  1908.  
  1909. //auto close after sending comment replies
  1910. d = $('<label Title="' + URC_Text_tooltip[31] + '"><input type="checkbox" id="UrCommentAutoCloseComment" class="URCommentsCheckbox"> ' + URC_Text[31] + '</input></label><br>');
  1911. $("#sidepanel-URComments-settings").append(d);
  1912. //create the callback function
  1913. $("#UrCommentAutoCloseComment").click(URComments.AutoCloseComment);
  1914.  
  1915. //auto reload map after sending comment replies
  1916. //d = $('<label Title="' + URC_Text_tooltip[32] + '"><input type="checkbox" id="UrCommentAutoReloadAfterComment" class="URCommentsCheckbox"> ' + URC_Text[32] + '</input></label><br>');
  1917. //$("#sidepanel-URComments-settings").append(d);
  1918. //create the callback function
  1919. //$("#UrCommentAutoReloadAfterComment").click(URComments.AutoReloadAfterComment);
  1920.  
  1921. //zoom out map after sending comment replies
  1922. d = $('<label Title="' + URC_Text_tooltip[33] + '"><input type="checkbox" id="UrCommentZoomOutAfterComment" class="URCommentsCheckbox"> ' + URC_Text[33] + '</input></label><br>');
  1923. $("#sidepanel-URComments-settings").append(d);
  1924. //create the callback function
  1925. $("#UrCommentZoomOutAfterComment").click(URComments.ZoomOutAfterComment);
  1926.  
  1927. //Auto switch to the URComments tab after page load
  1928. d = $('<label Title="' + URC_Text_tooltip[34] + '"><input type="checkbox" id="UrCommentAutoSwitchToURCommentsTab" class="URCommentsCheckbox"> ' + URC_Text[34] + '</input></label><br>');
  1929. $("#sidepanel-URComments-settings").append(d);
  1930. //create the callback function
  1931. $("#UrCommentAutoSwitchToURCommentsTab").click(URComments.AutoSwitchToURCommentsTab);
  1932.  
  1933. //Double clicking the 7 day close comment will auto send the 7day close comment
  1934. d = $('<label Title="' + URC_Text_tooltip[35] + '"><input type="checkbox" id="UrCommentDBLClk7DCAutoSend" class="URCommentsCheckbox"> ' + URC_Text[35] + '</input></label><br>');
  1935. $("#sidepanel-URComments-settings").append(d);
  1936. //create the callback function
  1937. $("#UrCommentDBLClk7DCAutoSend").click(URComments.DBLClk7DCAutoSend);
  1938.  
  1939. //Double clicking comments will auto send comments
  1940. d = $('<label Title="' + URC_Text_tooltip[36] + '"><input type="checkbox" id="UrCommentDBLClkAll" class="URCommentsCheckbox"> ' + URC_Text[36] + '</input></label><br>');
  1941. $("#sidepanel-URComments-settings").append(d);
  1942. //create the callback function
  1943. $("#UrCommentDBLClkAll").click(URComments.DBLClkAll);
  1944.  
  1945. //go over BoilerPlateCreatorsArray and generate the select
  1946. d = '<font style="font-size: 12px;">' + URC_Text[37] + ' <select id="BoilerPlateCreators" style="font-size: 12px; margin-top: 5px;" title="' + URC_Text_tooltip[37] + '">';
  1947. for (i = 0; i < BoilerPlateCreatorsArray.length; i = i + 1) {
  1948. //urctoConsole("BoilerPlateCreatorsArray " + BoilerPlateCreatorsArray[i]);
  1949. d = d + '<option style="font-size 12px;" value="' + BoilerPlateCreatorsArray[i] + '">' + BoilerPlateCreatorsArray[i] + '</option>';
  1950. }
  1951. d = d + "</select> </font><br><br>";
  1952. $("#sidepanel-URComments-settings").append(d);
  1953. //create call back for the select
  1954. $("#BoilerPlateCreators").change(URComments.BoilerPlateCreatorsFunction);
  1955.  
  1956. //UrCommentDisableURDoneBtn
  1957. d = $('<label Title="' + URC_Text_tooltip[38] + '"><input type="checkbox" id="UrCommentDisableURDoneBtn" class="URCommentsCheckbox"> ' + URC_Text[38] + '</input></label><br>');
  1958. //$("#sidepanel-URComments-list").append(d);
  1959. $("#sidepanel-URComments-settings").append(d);
  1960. $("#UrCommentDisableURDoneBtn").click(function() {
  1961. $(localStorage.setItem('UrCommentDisableURDoneBtn', UrCommentDisableURDoneBtn.checked));
  1962. });
  1963.  
  1964. var avdd = localStorage.getItem('UrCommentDisableURDoneBtn');
  1965. if (avdd === null) {
  1966. avdd = true;
  1967. }
  1968. $("#UrCommentDisableURDoneBtn").prop('checked', eval(avdd));
  1969.  
  1970. //URCommentURUnfollow
  1971. d = $('<label Title="' + URC_Text_tooltip[39] + '"><input type="checkbox" id="URCommentURUnfollow" class="URCommentsCheckbox"> ' + URC_Text[39] + '</input></label><br>');
  1972. $("#sidepanel-URComments-settings").append(d);
  1973. $("#URCommentURUnfollow").click(function() {
  1974. $(localStorage.setItem('URCommentURUnfollow', URCommentURUnfollow.checked));
  1975. });
  1976.  
  1977. var avdd = localStorage.getItem('URCommentURUnfollow');
  1978. if (avdd === null) {
  1979. avdd = false;
  1980. }
  1981. $("#URCommentURUnfollow").prop('checked', eval(avdd));
  1982.  
  1983. //when on screen auto send my own reminders
  1984. d = $('<label Title="' + URC_Text_tooltip[40] + '"><input type="checkbox" id="URCommentsAutoSendMyReminders" class="URCommentsCheckbox"> ' + URC_Text[40] + '</input></label><br>');
  1985. $("#sidepanel-URComments-settings").append(d);
  1986. $("#URCommentsAutoSendMyReminders").click(function() {
  1987.  
  1988. if (URCommentsAutoSendMyReminders.checked == true) {
  1989. 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. "
  1990.  
  1991. //this is where we reuse the r var this makes the nested ifs much more simple
  1992. if (r === true) {
  1993. setTimeout(URComments.FilterURs('URCommentsAutoSendMyReminders'), 0);
  1994. } else {
  1995. $("#URCommentsAutoSendMyReminders").prop('checked', false);
  1996.  
  1997. }
  1998. }
  1999. $(localStorage.setItem('URCommentsAutoSendMyReminders', URCommentsAutoSendMyReminders.checked));
  2000. });
  2001.  
  2002. var avdd = localStorage.getItem('URCommentsAutoSendMyReminders');
  2003. if (avdd === null) {
  2004. avdd = false;
  2005. }
  2006. $("#URCommentsAutoSendMyReminders").prop('checked', eval(avdd));
  2007.  
  2008. d = $('<label Title="' + URC_Text_tooltip[41] + '"><input type="checkbox" id="URCommentsReplaceTagWithEditorName" class="URCommentsCheckbox"> ' + URC_Text[41] + '</input></label><br>');
  2009. $("#sidepanel-URComments-settings").append(d);
  2010. $("#URCommentsReplaceTagWithEditorName").click(function() {
  2011. $(localStorage.setItem('URCommentsReplaceTagWithEditorName', URCommentsReplaceTagWithEditorName.checked));
  2012. setTimeout(URComments.FilterURs('URCommentsReplaceTagWithEditorName'), 0);
  2013. });
  2014.  
  2015. var avdd = localStorage.getItem('URCommentsReplaceTagWithEditorName');
  2016. if (avdd === null) {
  2017. avdd = false;
  2018. }
  2019. $("#URCommentsReplaceTagWithEditorName").prop('checked', eval(avdd));
  2020.  
  2021.  
  2022.  
  2023.  
  2024. // dBsooner - 11/21/2018 for placing icon in tab title and removing URC icon and reload icon from panel contents. Also center justified the Comments, UR Filtering and Settings tab title pills.
  2025. // d = $('<label Title="' + URC_Text_tooltip[43] + '"><input type="checkbox" id="URCommentsDontShowTaggedText" class="URCommentsCheckbox"> ' + URC_Text[43] + '</input></label><br>');
  2026. d = $('<label Title="' + URC_Text_tooltip[43] + '"><input type="checkbox" id="URCommentsDontShowTaggedText" class="URCommentsCheckbox"> ' + URC_Text[43] + '</input></label>');
  2027. // dBsooner - 11/21/2018 - END
  2028. $("#sidepanel-URComments-settings").append(d);
  2029. $("#URCommentsDontShowTaggedText").click(function() {
  2030. $(localStorage.setItem('URCommentsDontShowTaggedText', URCommentsDontShowTaggedText.checked));
  2031. setTimeout(URComments.FilterURs(URCommentsDontShowTaggedText), 0);
  2032. });
  2033.  
  2034. var avdd = localStorage.getItem('URCommentsDontShowTaggedText');
  2035. if (avdd === null) {
  2036. avdd = false;
  2037. }
  2038. $("#URCommentsDontShowTaggedText").prop('checked', eval(avdd));
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061. //urctoConsole("Tab Complete");
  2062.  
  2063. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2064. //////
  2065. ////// Load and set saved options
  2066. //////
  2067. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2068.  
  2069. //URComments tab is loaded load options to last state
  2070. //here we also check to see if the options have ever been set (new user) if not we enable them all on script load
  2071. //enabling them will trigger a click of the option which will cause the option to be saved
  2072.  
  2073. //OnlyMyUR have the predefined pre-sets only show comments that the current user has commented on
  2074. if (localStorage.getItem('OnlyMyUR') == "yes") {
  2075. $("#URCommentUROOnlyMyUR").trigger('click');
  2076. }
  2077.  
  2078. //auto set new urs comment
  2079. if (localStorage.getItem('AutoSetNewComment') == "yes" || !localStorage.getItem('AutoSetNewComment')) {
  2080. $("#UrCommentAutoSetNewComment").trigger('click');
  2081. }
  2082.  
  2083. //auto set 4day urs comment
  2084. if (localStorage.getItem('UrCommentAutoSet4dayComment') == "yes" || !localStorage.getItem('UrCommentAutoSet4dayComment')) {
  2085. $("#UrCommentAutoSet4dayComment").trigger('click');
  2086. }
  2087.  
  2088. //UrCommentAutoCloseComment
  2089. if (localStorage.getItem('UrCommentAutoCloseComment') == "yes" || !localStorage.getItem('UrCommentAutoCloseComment')) {
  2090. $("#UrCommentAutoCloseComment").trigger('click');
  2091. }
  2092.  
  2093. //AutoReloadAfterComment
  2094. //if (localStorage.getItem('AutoReloadAfterComment') == "yes") {
  2095. // $("#UrCommentAutoReloadAfterComment").trigger('click');
  2096. //}
  2097.  
  2098. //NewZoomIn
  2099. if (localStorage.getItem('NewZoomIn') == "yes" || !localStorage.getItem('NewZoomIn')) {
  2100. $("#UrCommentNewZoomIn").trigger('click');
  2101. }
  2102.  
  2103. //auto recenter ur without comments
  2104. if (localStorage.getItem('WithCommentRecenter') == "yes" || !localStorage.getItem('WithCommentRecenter')) {
  2105. $("#UrCommentWithCommentRecenter").trigger('click');
  2106. }
  2107.  
  2108. // URComments load and set settings and check boxes
  2109. if (localStorage.getItem('AutoClickURStatus') == "yes" || !localStorage.getItem('AutoClickURStatus')) {
  2110. $("#URCommentAutoClickURStatus").trigger('click');
  2111. if (localStorage.getItem('DBLClk7DCAutoSend') == "yes" || localStorage.getItem('DBLClkAll') == "yes") {
  2112. $('#URCommentAutoClickURStatus').prop('checked', true);
  2113. localStorage.setItem('AutoClickURStatus', 'yes');
  2114. }
  2115. }
  2116.  
  2117. //UrCommentSaveAfterComment
  2118. if (localStorage.getItem('SaveAfterComment') == "yes" || !localStorage.getItem('SaveAfterComment')) {
  2119. $("#UrCommentSaveAfterComment").trigger('click');
  2120. }
  2121.  
  2122. //AutoZoomOutAfterComment
  2123. if (localStorage.getItem('ZoomOutAfterComment') == "yes" || !localStorage.getItem('ZoomOutAfterComment')) {
  2124. $("#UrCommentZoomOutAfterComment").trigger('click');
  2125. }
  2126.  
  2127. //AutoSwitchToURCommentsTab
  2128. if (localStorage.getItem('AutoSwitchToURCommentsTab') == "yes" || !localStorage.getItem('AutoSwitchToURCommentsTab')) {
  2129. $("#UrCommentAutoSwitchToURCommentsTab").trigger('click');
  2130. }
  2131.  
  2132. //UrCommentDBLClk7DCAutoSend
  2133. if (localStorage.getItem('DBLClk7DCAutoSend') == "yes") {
  2134. $("#UrCommentDBLClk7DCAutoSend").prop('checked', true);
  2135. $("#AutoClickURStatus").prop('checked', true);
  2136. localStorage.setItem('AutoClickURStatus', 'yes');
  2137. }
  2138.  
  2139. //UrCommentDBLClkAll
  2140. if (localStorage.getItem('DBLClkAll') == "yes") {
  2141. $("#UrCommentDBLClkAll").prop('checked', true);
  2142. $("#AutoClickURStatus").prop('checked', true);
  2143. localStorage.setItem('AutoClickURStatus', 'yes');
  2144. }
  2145.  
  2146. //set the users BoilerPlateCreators choice in the select
  2147. SelectedBoilerPlateCreator = localStorage.getItem('BoilerPlateCreators');
  2148. if (SelectedBoilerPlateCreator === "LoadingSelected" || !urcListLoaded) {
  2149. $("#BoilerPlateCreators").val("---Loading---");
  2150. } else {
  2151. $("#BoilerPlateCreators").val(SelectedBoilerPlateCreator);
  2152. }
  2153. //end getting boilerplatecreators
  2154.  
  2155. //check to see if the option to auto switch to the URComments tab is enabled
  2156. //if (UrCommentAutoSwitchToURCommentsTab.checked) {
  2157. // //make UR Comments tab active
  2158. // $('#CommentsTab').trigger('click');
  2159. //}
  2160.  
  2161. if (URCommentUpdateMessage === "yes") {
  2162. //alert the user in URComment version updates
  2163. if (localStorage.getItem('URCommentVersion') === URCommentVersion) {
  2164. //urctoConsole("Version - " + URCommentVersion);
  2165. } else {
  2166. alert(URCommentVersionUpdateNotes);
  2167. localStorage.setItem('URCommentVersion', URCommentVersion);
  2168. }
  2169. }
  2170.  
  2171. //set the background of the last used URO preset
  2172. //URComments.UROPresetHighlight(localStorage.getItem('UROCurrentPeset'));
  2173.  
  2174. // Set the urcTabLoaded variable to true so functions that depend on the tab being loaded can go ahead and process.
  2175.  
  2176.  
  2177.  
  2178. urcTabLoaded = true;
  2179.  
  2180.  
  2181. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2182. //////
  2183. ////// Launch background task(s)
  2184. //////
  2185. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2186.  
  2187. //start looking for opened UR's window
  2188. setTimeout(URComments.LookForOpenedUR, 1000);
  2189.  
  2190. //start filtering ur
  2191. //setTimeout(URComments.FilterURs, 3000);
  2192. //setInterval(URComments.FilterURs('FilterURs interval'), 5000);
  2193.  
  2194. //setInterval(URComments.urcUREvent_onObjectsAdded('FilterURs interval'), 5000);
  2195.  
  2196. //reset URO the hiding of tagged pin
  2197. //setTimeout(URComments.HideTagged("startup"), 10000);
  2198.  
  2199. setTimeout(URComments.URCLoadUpdateRequestsEvents, 0);
  2200.  
  2201. //enable exp road $( ".toggler label span:contains('Roads experimental')" ).click();// turn on experimental roads layer
  2202. //$(".toggler label span:contains('Me!')").click(); //auto enable wme me!
  2203. //end of URCommentsinit
  2204. };
  2205.  
  2206. ///////////////////////////////////////////////////////////////////////////////////
  2207. //////
  2208. ////// Background task(s)
  2209. //////
  2210. ///////////////////////////////////////////////////////////////////////////////////
  2211.  
  2212. //look for the UR window to be open
  2213. URComments.LookForOpenedUR = function() {
  2214. //urctoConsole("look for open UR window " + (new Date()).getTime());
  2215. //check for an open UR and that the UR's text area is shown
  2216.  
  2217. //test urc messages
  2218. //var dateNow = new Date();
  2219. //TrickRemove = dateNow.getTime();
  2220. //URComments.ShowWMEMessage("test " + TrickRemove , 10000);
  2221.  
  2222. //relaunch checking for open ur - moved this up here so the script would keep trying if I had an error
  2223. setTimeout(URComments.LookForOpenedUR, 500); //line 892
  2224.  
  2225. var urID = 0;
  2226.  
  2227. urID = $(".update-requests .selected").data("id");
  2228.  
  2229. /*
  2230. 768 807
  2231. 900 974
  2232. 1050 1156
  2233. 1080 941
  2234. */
  2235.  
  2236. /*
  2237. //try to resize the ur window to the browser size
  2238. if(urID > 0 && typeof urID !== 'undefined') {
  2239.  
  2240. if(window.innerHeight <= 810){ //*768
  2241. $('.problem-edit .conversation.section .comment-list').css('max-height', '110px');
  2242.  
  2243.  
  2244. } else { //default wme setting
  2245. //$('.problem-edit .conversation.section .comment-list').css('max-height', '500px');
  2246. $('.problem-edit .conversation.section .comment-list').css('max-height', window.innerHeight - 700 +'px');
  2247. }
  2248. }
  2249.  
  2250. //comment area
  2251. $('.problem-edit .conversation.section .comment-list').css('max-height', '100%');
  2252.  
  2253. }
  2254. */
  2255.  
  2256. if (urID > 0 && typeof urID !== 'undefined') {
  2257.  
  2258. //new or same ur (re))open(ed) so now we can do stuff; this prevents this function to continuously applying settings to a ur
  2259. if (UrCommentLasturID !== urID && $(".new-comment-text").length !== 0) {
  2260. //urctoConsole("Found open UR - " + urID);
  2261.  
  2262. //grab the current UR ID for next time
  2263. UrCommentLasturID = urID;
  2264.  
  2265. //url to open a UR
  2266. //https://www.waze.com/editor/?zoom=5&lat=34.024522&lon=-118.297005&mapUpdateRequest=3710607&env=usa
  2267. //https://www.waze.com/editor/?zoom=5&mapUpdateRequest=4271288&env=usa
  2268.  
  2269. //auto expand ur comments list and text area (verify that this is not for the old WME)
  2270. if ($('#edit-request .comment-view-shown').length === 0) {
  2271. setTimeout(function() {
  2272. $('#edit-request .toggle-comment-view').trigger('click');
  2273. }, 0);
  2274. }
  2275.  
  2276. //beta editor auto expand ur comments list and text area
  2277. if ($("#panel-container .problem-edit .conversation").length !== 0) {
  2278. $("#panel-container .problem-edit .conversation").removeClass('collapsed'); //beta editor auto expand UR Comment box
  2279. }
  2280.  
  2281. //beta editor auto expand ur comments more info
  2282. if ($("#panel-container .problem-edit .more-info").length !== 0) {
  2283. $("#panel-container .problem-edit .more-info").removeClass('collapsed'); //beta editor auto expand UR Comment box
  2284. }
  2285.  
  2286. /*
  2287. //disable the stupid new done button
  2288. if ($("#panel-container .content .done").length > 0 && UrCommentDisableURDoneBtn.checked === true) {
  2289. $("#panel-container .content .done").attr('disabled', true);
  2290. $("#panel-container .content .done").html('(Done) Disabled by URComments');
  2291. }
  2292.  
  2293. //is the done/next disabled box checked
  2294. if(UrCommentDisableURDoneBtn.checked === true) {
  2295. if ($("#panel-container .content .next").length > 0) {
  2296. //disable the stupid new next button
  2297. $("#panel-container .content .next").attr('disabled', true);
  2298. $("#panel-container .content .next").html('(Next) Disabled by URComments');
  2299. } else if ($("#panel-container .content .done").length > 0) {
  2300. //disable the stupid new done button
  2301. $("#panel-container .content .done").attr('disabled', true);
  2302. $("#panel-container .content .done").html('(Done) Disabled by URComments');
  2303. }
  2304.  
  2305. }*/
  2306.  
  2307.  
  2308. //disable the stupid buttons at the bottom of the UR window done / next
  2309. if ($("#panel-container .content .navigation .btn-block").length > 0 && UrCommentDisableURDoneBtn.checked === true) {
  2310. $("#panel-container .content .navigation .btn-block").attr('disabled', true);
  2311. $("#panel-container .content .navigation .btn-block").html('Disabled by URComments');
  2312. }
  2313.  
  2314. //complaints about editors not reading the description so I am moving the description up a div
  2315. var desc = $(".body .description").html();
  2316. if (desc != undefined) {
  2317. //move the description up a div
  2318. $(".problem-edit .header").after('<div class="description section">' + desc + '</div>');
  2319. $(".problem-edit .body .description").remove();
  2320. }
  2321.  
  2322. //jump to bottom
  2323. //$('.problem-edit .comment-list').scrollTop($('.conversation-view .comment-list')[0].scrollHeight);
  2324. // $('.problem-edit .problem-data').scrollTop($('.conversation-view .comment-list')[0].scrollHeight);
  2325. $('.top-section').scrollTop($('.top-section')[0].scrollHeight);
  2326.  
  2327.  
  2328. //attach an even listener to the UR center button to take us to the UR
  2329. $('#panel-container > div > div > div.header > a.focus > i').click(URComments.CrossHairsClicked(urID, 5));
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337. //auto fill in comment
  2338. //check what type of message to insert into the ur
  2339. reporter_comment = W.model.updateRequestSessions.objects[urID].comments;
  2340. i = reporter_comment.length;
  2341.  
  2342. //urctoConsole("LookForOpenedUR number of comments: " + i);
  2343.  
  2344. //if number of comment is zero assume this is a new ur
  2345. if (i === 0) {
  2346. //initial, zero comments
  2347.  
  2348. //urctoConsole("LookForOpenedUR no comments");
  2349.  
  2350. if (UrCommentAutoSetNewComment.checked === true) {
  2351. //urctoConsole("LookForOpenedUR no comments2");
  2352. //this will be on of the types of UR that a user can choose from when submitting a UR
  2353.  
  2354. var urType = W.model.mapUpdateRequests.objects[urID].attributes.type;
  2355.  
  2356. //urctoConsole("LookForOpenedUR Found open UR - " + urID + " " + def_names[urType]);
  2357.  
  2358. //loop trough the comment array for a comment that matches the request type.
  2359. for (var ii = 0; ii < URCommentsArray.length; ii = ii + 3) {
  2360. if (URCommentsArray[ii].toLowerCase() === def_names[urType].toLowerCase()) {
  2361. //urctoConsole("LookForOpenedUR Matched Comment: " + def_names[urType]);
  2362. setTimeout(URComments.AutoZoomIN(URCommentsArray[ii], URCommentsArray[ii + 1], URCommentsArray[ii + 2], urID), 0);
  2363. }
  2364. }
  2365. }
  2366.  
  2367. } else {
  2368. //4DAY OR 7DAY section
  2369.  
  2370. LastCommentorUserID = reporter_comment[reporter_comment.length - 1].userID;
  2371. //urctoConsole("LookForOpenedUR LastCommentorUserID: " + LastCommentorUserID);
  2372.  
  2373. //uro days old
  2374. var commentDaysOld = URComments.uroGetCommentAge(W.model.updateRequestSessions.objects[urID].comments[i - 1]);
  2375. //urctoConsole("LookForOpenedUR Days old: " + commentDaysOld);
  2376.  
  2377. //if (i === 1 && commentDaysOld >= 4 && LastCommentorUserID > 1 && UrCommentAutoSet4dayComment.checked === true) {
  2378. var ReminderDays = $('#ReminderDays').val();
  2379. //urctoConsole("LookForOpenedUR ReminderDays: " + ReminderDays);
  2380.  
  2381. if (i === 1 && ReminderDays > 0 && commentDaysOld >= ReminderDays && LastCommentorUserID > 1 && UrCommentAutoSet4dayComment.checked === true) {
  2382. //4day - 1 comment, last comment less than 4 days, last comment is not from reporter
  2383. //urctoConsole("LookForOpenedUR 4day");
  2384.  
  2385. //4 day ur 1 comment
  2386. setTimeout(URComments.AutoZoomIN(URCommentsArray[ReminderPosistion], URCommentsArray[ReminderPosistion + 1], URCommentsArray[ReminderPosistion + 2], urID), 0);
  2387. }
  2388. //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.
  2389.  
  2390. }
  2391.  
  2392. var WazeCurrentZoom = "";
  2393. WazeCurrentZoom = URComments.GetWazeMapZoomLevel();
  2394.  
  2395. //urctoConsole("zoomD " + WazeCurrentZoom + " " + UrCommentNewZoomIn.checked);
  2396.  
  2397. if (i === 0 && UrCommentNewZoomIn.checked === true) {
  2398. //zoom in new
  2399. //predefined zoom threshold for auto zoom
  2400. var zoom = 4;
  2401.  
  2402. //do not zoom back out if we are already zoomed in and just happen to be re-clicking on a UR.
  2403. if (WazeCurrentZoom < zoom) {
  2404. //urctoConsole("zoom in 1");
  2405. URComments.gotoURById(urID, 5);
  2406. }
  2407. } else if (UrCommentWithCommentRecenter.checked === true) {
  2408. //re-center on urs that are not zoom in
  2409. if (WazeCurrentZoom < 3) {
  2410. //alert(WazeCurrentZoom);
  2411. //urctoConsole("Auto center 1");
  2412. URComments.gotoURById(urID, WazeCurrentZoom);
  2413. }
  2414.  
  2415. }
  2416.  
  2417. //auto switch to ur comments tab
  2418. if (UrCommentAutoSwitchToURCommentsTab.checked) {
  2419. //grab the active tab
  2420. PreviousTab = $("#user-tabs > ul > li.active > a");
  2421. //grab the active tabs scroll posistion
  2422. PreviousTabPosistion = $('#sidebar').scrollTop();
  2423. $('#sidebar').scrollTop( 0 ); //set scoll pos
  2424.  
  2425.  
  2426. //make UR Comments tab active
  2427. $('#CommentsTab').trigger('click');
  2428. }
  2429. }
  2430.  
  2431.  
  2432. } else {
  2433. //reset the id if a ur is not open so we can set the tab for the same ur
  2434. UrCommentLasturID = "";
  2435. urID = "";
  2436. //switch tab back
  2437. if (UrCommentAutoSwitchToURCommentsTab.checked) {
  2438. //verify that we had found a tab
  2439. if (PreviousTab !== null) {
  2440. //click back on the previous tab
  2441. $(PreviousTab).trigger('click');
  2442. $('#sidebar').scrollTop( PreviousTabPosistion ); //set scoll pos
  2443. //clear out the previous tab holder
  2444. PreviousTab = null;
  2445. PreviousTabPosistion = null;
  2446. }
  2447. }
  2448. //urctoConsole("LookForOpenedUR Looking for ur...");
  2449. }
  2450.  
  2451. };
  2452.  
  2453. ////////////////////////////////////////////////////////////////////////////
  2454. //////
  2455. ////// Save Options on click
  2456. //////
  2457. ////////////////////////////////////////////////////////////////////////////
  2458.  
  2459. //use uro to only show urs that I have commented on
  2460. URComments.OnlyMyUR = function() {
  2461.  
  2462. //try to save the state of the check box
  2463. if (URCommentUROOnlyMyUR.checked) {
  2464. localStorage.setItem('OnlyMyUR', 'yes');
  2465. } else {
  2466. localStorage.setItem('OnlyMyUR', 'no');
  2467. }
  2468.  
  2469. //only show my ur 'OnlyMyUR'
  2470. if (URCommentUROOnlyMyUR.checked && !_cbHideAnyComments.checked) {
  2471. $("#_cbHideAnyComments").trigger('click');
  2472.  
  2473. } else if (!URCommentUROOnlyMyUR.checked && _cbHideAnyComments.checked) {
  2474. $("#_cbHideAnyComments").trigger('click');
  2475. }
  2476.  
  2477. };
  2478. /*
  2479. //URCommentUROHideTagged
  2480. //use uro to Hide Tagged pins
  2481. URComments.HideTagged = function(when) {
  2482. return function() {
  2483. //urctoConsole("URCommentUROHideTagged");
  2484. URComments.TaggedPinsAray = [
  2485. "_cbFilterRoadworks", //
  2486. "_cbFilterConstruction",//
  2487. "_cbFilterClosure", //
  2488. "_cbFilterEvent", //
  2489. "_cbFilterNote" //
  2490. ];
  2491.  
  2492. //go over the array and clear all of the URO+ check boxes
  2493. for (var URComments_URO_Index = 0; URComments_URO_Index < URComments.TaggedPinsAray.length; URComments_URO_Index = URComments_URO_Index + 1) {
  2494. if(when==="startup") {
  2495. if ($('#' + URComments.TaggedPinsAray[URComments_URO_Index]).is(":checked")) {
  2496. $('#URCommentUROHideTagged').prop('checked', true);
  2497. }
  2498.  
  2499.  
  2500. } else {
  2501. //urctoConsole("URCommentUROHideTagged " + URComments.TaggedPinsAray[URComments_URO_Index]);
  2502.  
  2503. if ($('#' + URComments.TaggedPinsAray[URComments_URO_Index]).length <= 0) {
  2504. alert("there was an error finding URO's hide tagged pins setting please verify these settings are in the correct state");
  2505. return false;
  2506. }
  2507.  
  2508.  
  2509. if (URCommentUROHideTagged.checked && !$('#' + URComments.TaggedPinsAray[URComments_URO_Index]).is(":checked")) {
  2510. $('#' + URComments.TaggedPinsAray[URComments_URO_Index]).trigger('click');
  2511. } else if (!URCommentUROHideTagged.checked && $('#' + URComments.TaggedPinsAray[URComments_URO_Index]).is(":checked")) {
  2512. $('#' + URComments.TaggedPinsAray[URComments_URO_Index]).trigger('click');
  2513. }
  2514. }
  2515. }
  2516. };
  2517. };
  2518. */
  2519.  
  2520. URComments.AutoClickURStatus = function() {
  2521. //try to save the state of the check box
  2522. if (URCommentAutoClickURStatus.checked) {
  2523. localStorage.setItem('AutoClickURStatus', 'yes');
  2524. //alert("yes");
  2525. } else {
  2526. localStorage.setItem('AutoClickURStatus', 'no');
  2527. //alert("no");
  2528. //turn off save after send
  2529. if (!URCommentAutoClickURStatus.checked && UrCommentSaveAfterComment.checked) {
  2530. $('#UrCommentSaveAfterComment').prop('checked', false);
  2531. localStorage.setItem('SaveAfterComment', 'no');
  2532. }
  2533.  
  2534. if (UrCommentDBLClk7DCAutoSend.checked == true || UrCommentDBLClkAll.checked == true) {
  2535. $('#URCommentAutoClickURStatus').prop('checked', true);
  2536. alert(URC_USER_PROMPT[4]); //"URComments to use the double click links you must have the autoset UR status option enabled"
  2537. localStorage.setItem('AutoClickURStatus', 'yes');
  2538. }
  2539. }
  2540. };
  2541.  
  2542. URComments.SaveAfterComment = function() {
  2543. //try to save the state of the check box
  2544. if (UrCommentSaveAfterComment.checked) {
  2545. localStorage.setItem('SaveAfterComment', 'yes');
  2546. //alert("yes");
  2547. } else {
  2548. localStorage.setItem('SaveAfterComment', 'no');
  2549. //alert("no");
  2550. }
  2551. //when save if on turn on auto click status
  2552. if (UrCommentSaveAfterComment.checked && !URCommentAutoClickURStatus.checked) {
  2553. $('#URCommentAutoClickURStatus').prop('checked', true);
  2554. localStorage.setItem('AutoClickURStatus', 'yes');
  2555. }
  2556. };
  2557.  
  2558. URComments.AutoCloseComment = function() {
  2559. //try to save the state of the check box
  2560. if (UrCommentAutoCloseComment.checked) {
  2561. localStorage.setItem('UrCommentAutoCloseComment', 'yes');
  2562. //alert("yes");
  2563. } else {
  2564. localStorage.setItem('UrCommentAutoCloseComment', 'no');
  2565. //alert("no");
  2566. }
  2567. //alert ( localStorage.getItem('UrCommentAutoCloseComment') );
  2568. };
  2569.  
  2570. // UrCommentAutoReloadAfterComment
  2571. //URComments.AutoReloadAfterComment = function() {
  2572. // UrCommentAutoReloadAfterComment
  2573. //try to save the state of the check box
  2574. // if (UrCommentAutoReloadAfterComment.checked) {
  2575. // localStorage.setItem('AutoReloadAfterComment', 'yes');
  2576. //alert("yes");
  2577. // } else {
  2578. // localStorage.setItem('AutoReloadAfterComment', 'no');
  2579. //alert("no");
  2580. // }
  2581. //};
  2582.  
  2583. URComments.ZoomOutAfterComment = function() {
  2584. if (UrCommentZoomOutAfterComment.checked) {
  2585. localStorage.setItem('ZoomOutAfterComment', 'yes');
  2586. //alert("yes");
  2587. } else {
  2588. localStorage.setItem('ZoomOutAfterComment', 'no');
  2589. //alert("no");
  2590. }
  2591. };
  2592.  
  2593. URComments.AutoSetNewComment = function() {
  2594. //add reply instructions to replies
  2595. //try to save the state of the check box
  2596. if (UrCommentAutoSetNewComment.checked) {
  2597. localStorage.setItem('AutoSetNewComment', 'yes');
  2598. //alert(" AutoSetNewComment yes");
  2599. } else {
  2600. localStorage.setItem('AutoSetNewComment', 'no');
  2601. //alert("AutoSetNewComment no");
  2602. }
  2603. };
  2604.  
  2605. URComments.UrCommentAutoSet4dayComment = function() {
  2606. //add reply instructions to replies
  2607. //try to save the state of the check box
  2608. if (UrCommentAutoSet4dayComment.checked) {
  2609. localStorage.setItem('UrCommentAutoSet4dayComment', 'yes');
  2610. //alert(" UrCommentAutoSet4dayComment yes");
  2611. } else {
  2612. localStorage.setItem('UrCommentAutoSet4dayComment', 'no');
  2613. //alert("UrCommentAutoSet4dayComment no");
  2614. }
  2615. };
  2616.  
  2617. URComments.NewZoomIn = function() {
  2618. //add reply instructions to replies
  2619. //try to save the state of the check box
  2620. if (UrCommentNewZoomIn.checked) {
  2621. localStorage.setItem('NewZoomIn', 'yes');
  2622. //alert(" NewZoomIn yes");
  2623. } else {
  2624. localStorage.setItem('NewZoomIn', 'no');
  2625. //alert("NewZoomIn no");
  2626. }
  2627.  
  2628. };
  2629.  
  2630. URComments.WithCommentRecenter = function() {
  2631. //add reply instructions to replies
  2632. //try to save the state of the check box
  2633. if (UrCommentWithCommentRecenter.checked) {
  2634. localStorage.setItem('WithCommentRecenter', 'yes');
  2635. //alert(" WithCommentRecenter yes");
  2636. } else {
  2637. localStorage.setItem('WithCommentRecenter', 'no');
  2638. //alert("WithCommentRecenter no");
  2639. }
  2640.  
  2641. };
  2642.  
  2643. URComments.AutoSwitchToURCommentsTab = function() {
  2644. // AutoSwitchToURCommentsTab
  2645. //try to save the state of the check box
  2646. if (UrCommentAutoSwitchToURCommentsTab.checked) {
  2647. localStorage.setItem('AutoSwitchToURCommentsTab', 'yes');
  2648. //alert("yes");
  2649. } else {
  2650. localStorage.setItem('AutoSwitchToURCommentsTab', 'no');
  2651. //alert("no");
  2652. }
  2653. };
  2654.  
  2655. //UrCommentDBLClk7DCAutoSend
  2656. URComments.DBLClk7DCAutoSend = function() {
  2657. if (UrCommentDBLClk7DCAutoSend.checked) {
  2658. //save the selection
  2659. localStorage.setItem('DBLClk7DCAutoSend', 'yes');
  2660.  
  2661. $('#URCommentAutoClickURStatus').prop('checked', true);
  2662. localStorage.setItem('AutoClickURStatus', 'yes');
  2663.  
  2664. } else {
  2665. localStorage.setItem('DBLClk7DCAutoSend', 'no');
  2666. }
  2667.  
  2668. //clear the html from the tabs
  2669. $("#sidepanel-Comments").html('');
  2670. //reload the content
  2671. ChangeLanguage = true;
  2672.  
  2673. //setTimeout(URComments_bootstrap, 20);
  2674. URComments_bootstrap();
  2675.  
  2676. };
  2677.  
  2678. //UrCommentDBLClkAll
  2679. URComments.DBLClkAll = function() {
  2680. if (UrCommentDBLClkAll.checked) {
  2681. localStorage.setItem('DBLClkAll', 'yes');
  2682.  
  2683. $('#URCommentAutoClickURStatus').prop('checked', true);
  2684. localStorage.setItem('AutoClickURStatus', 'yes');
  2685. } else {
  2686. localStorage.setItem('DBLClkAll', 'no');
  2687. }
  2688.  
  2689. //clear the html from the tabs
  2690. $("#sidepanel-Comments").html('');
  2691. //reload the content
  2692. ChangeLanguage = true;
  2693.  
  2694. //setTimeout(URComments_bootstrap, 20);
  2695. URComments_bootstrap();
  2696. };
  2697.  
  2698. ///////////////////////////////////////////////////////////////////////
  2699. //////
  2700. ////// UR Comment functions
  2701. //////
  2702. ///////////////////////////////////////////////////////////////////////
  2703.  
  2704. URComments.escapeHtml = function(a) {
  2705. a = a.replace(/&/g, "&amp;");
  2706. a = a.replace(/</g, "&lt;");
  2707. a = a.replace(/>/g, "&gt;");
  2708. a = a.replace(/"/g, "&quot;");
  2709. a = a.replace(/'/g, "&#039;");
  2710. return a;
  2711. };
  2712.  
  2713. //$( "#update-request-panel .solution p").html()
  2714. URComments.StringSwap = function(a) {
  2715.  
  2716. if ($("#update-request-panel .solution p").length > 0) {
  2717. a = a.replace("$URD", $("#update-request-panel .solution p").html());
  2718. //remove stupid waze spaces
  2719. //a = $(".new-comment-text").val()
  2720. a = a.replace(/ /g, "");
  2721. a = a.replace(/ /g, "");
  2722. a = a.replace(/(\r\n|\n)/gm, "");
  2723. } else if ($(".description .content").length > 0) {
  2724. a = a.replace("$URD", $(".description .content").html());
  2725. a = a.replace(/ /g, "");
  2726. a = a.replace(/ /g, "");
  2727. a = a.replace(/(\r\n|\n)/gm, "");
  2728. a = a.replace("$USERNAME", W.model.loginManager.user.userName);
  2729. } else if (a.indexOf("$URD") >= 0) {
  2730. //a = "";
  2731. a = a.replace(" \"$URD\"", "");
  2732. }
  2733.  
  2734. //selected segments
  2735. var streetName = "";
  2736. //console.log("urc string swap");
  2737. if (W.selectionManager.getSelectedFeatures().length >= 1 && W.selectionManager.getSelectedFeatures().length <= 2) {
  2738. for (var i = 0; i < W.selectionManager.getSelectedFeatures().length; i++) {
  2739. if (W.selectionManager.getSelectedFeatures()[i].model.CLASS_NAME == "W.Feature.Vector.Segment") {
  2740. var primaryStreetID = W.selectionManager.getSelectedFeatures()[i].model.attributes.primaryStreetID;
  2741. if (i == 0) {
  2742. streetName = W.model.streets.objects[primaryStreetID].name;
  2743. } else {
  2744. streetName = "the intersection of " + streetName + " and " + W.model.streets.objects[primaryStreetID].name;
  2745. }
  2746. }
  2747. }
  2748. //console.log(streetName);
  2749. a = a.replace("$SELSEGS", streetName);
  2750. }
  2751.  
  2752. return a;
  2753. };
  2754.  
  2755. //gets the total number of comments on a ur
  2756. TotalNumberOfComments = function(urID) {
  2757. //urctoConsole("reporterComments");
  2758. return ($(wazeModel.updateRequestSessions.objects[urID].comments).length);
  2759. };
  2760.  
  2761. //sorry URO if i was going to use you to sort Urs i needed to use the same dates you do! Thanks! ;)
  2762. URComments.uroGetCommentAge = function(commentObj) {
  2763. if (commentObj.createdOn === null) return -1;
  2764. return URComments.uroDateToDays(commentObj.createdOn);
  2765. };
  2766.  
  2767. URComments.uroDateToDays = function(dateToConvert) {
  2768. var dateNow = new Date();
  2769. var elapsedSinceEpoch = dateNow.getTime();
  2770. var elapsedSinceEvent = elapsedSinceEpoch - dateToConvert;
  2771. dateNow.setHours(0);
  2772. dateNow.setMinutes(0);
  2773. dateNow.setSeconds(0);
  2774. dateNow.setMilliseconds(0);
  2775. var elapsedSinceMidnight = elapsedSinceEpoch - dateNow.getTime();
  2776. if (elapsedSinceEvent < elapsedSinceMidnight) {
  2777. // event occurred today...
  2778. return 0;
  2779. } else {
  2780. // event occurred at some point prior to midnight this morning, so return a minimum value of 1...
  2781. return 1 + Math.floor((elapsedSinceEvent - elapsedSinceMidnight) / 86400000);
  2782. }
  2783. };
  2784.  
  2785. URComments.onScreen = function(obj) {
  2786.  
  2787. //geometry was removed from W.model.mapUpdateRequests.objects[id]
  2788. //but can be found in W.model.mapUpdateRequests.objects[id].geometry
  2789.  
  2790. if (obj.geometry) {
  2791. return (W.map.getExtent().intersectsBounds(obj.geometry.getBounds()));
  2792. }
  2793. return false;
  2794. };
  2795.  
  2796. URComments.URCLoadUpdateRequestsEvents = function() {
  2797. /*
  2798. W.model.mapUpdateRequests.events.register("objectschanged", null, uroFilterURs_onObjectsChanged);
  2799. W.model.mapUpdateRequests.events.register("objectsadded", null, uroFilterURs_onObjectsAdded);
  2800. W.model.mapUpdateRequests.events.register("objectsremoved", null, uroFilterURs_onObjectsRemoved);
  2801.  
  2802. W.model.updateRequestSessions.events.register("objectschanged", null, uroUREvent_onObjectsChanged);
  2803. W.model.updateRequestSessions.events.register("objectsadded", null, uroUREvent_onObjectsAdded);
  2804. W.model.updateRequestSessions.events.register("objectsremoved", null, uroUREvent_onObjectsRemoved);
  2805. */
  2806.  
  2807. window.HideUR = "stopped";
  2808. //W.model.mapUpdateRequests.events.register("objectschanged", null, URComments.urcUREvent_onObjectsAdded('mapUpdateRequests objectschanged')); //needed
  2809. //W.model.updateRequestSessions.events.register("objectsadded", null, URComments.urcUREvent_onObjectsAdded('updateRequestSessions objectsadded'));
  2810.  
  2811. //from Cardyin 5/26/2016
  2812. W.model.mapUpdateRequests.on("objectschanged", URComments.urcUREvent_onObjectsAdded('mapUpdateRequests objectschanged')); //needed
  2813. W.model.updateRequestSessions.on("objectsadded", URComments.urcUREvent_onObjectsAdded('updateRequestSessions objectsadded')); //needed
  2814.  
  2815.  
  2816. W.map.events.register("moveend", null, URComments.urcUREvent_onObjectsAdded('moveend')); //needed
  2817. W.map.events.register("zoomend", null, URComments.urcUREvent_onObjectsAdded('zoomend')); //needed
  2818.  
  2819. W.map.events.register("mergeend", null, URComments.urcUREvent_onObjectsAdded('mergeend')); //needed
  2820.  
  2821. //W.map.events.register("mouseup", null, URComments.urcUREvent_onObjectsAdded('mouseup'));
  2822.  
  2823. //urctoConsole("UR events added");
  2824.  
  2825. //setTimeout(URComments.urcUREvent_onObjectsAdded('pageload'), 1000);
  2826. setTimeout(URComments.urcUREvent_onObjectsAdded('pageload'), 50);
  2827. };
  2828.  
  2829.  
  2830. URComments.urcUREvent_onObjectsAdded = function(a) {
  2831. return function() {
  2832.  
  2833. //check if filtering or the pill count are enabled other wise abort this function
  2834. //URCommentsFilterEnabled URCommentsPillEnabled
  2835. if (URCommentsFilterEnabled.checked === false && URCommentsPillEnabled.checked === false && URCommentsAutoSendMyReminders.checked === false) {
  2836. //urctoConsole(URC_USER_PROMPT[5]); //"aborting FilterURs2 becasue both filtering, counts, and auto reminders are disabled"
  2837. return;
  2838. }
  2839.  
  2840. //urctoConsole("urcUREvent_onObjectsAdded " + a + " " + window.HideUR);
  2841.  
  2842. if (a == "timedout" && window.HideUR == "running") { //|| a === "list is empty retry"){
  2843. window.HideUR = "stopped";
  2844. a = "timedout";
  2845. URComments.ShowWMEMessage(URC_USER_PROMPT[6], 5000); //"URComments: Loading UR data has timed out, retrying."
  2846. urctoConsole("urcUREvent_onObjectsAdded a == timedout: " + a + " " + window.HideUR);
  2847.  
  2848. }
  2849.  
  2850. if(window.HideUR == "running"){
  2851. urctoConsole("urcUREvent_onObjectsAdded is running so dont run a dupe: " + a + " " + window.HideUR);
  2852. return;
  2853. }
  2854.  
  2855. if (window.HideUR === "stopped" && a !== "timedout") {
  2856. clearTimeout(window.buffertedtimeout);
  2857. clearTimeout(window.buffertedtimeout2);
  2858.  
  2859. urctoConsole("set time-out to filter UR and time-out check " + a + " " + window.HideUR);
  2860.  
  2861. //certain events need to be launched a bit later then others
  2862. if (a == "moveend" || a == "zoomend") {
  2863. window.buffertedtimeout = setTimeout(URComments.FilterURs(a), 5000);
  2864. } else {
  2865. window.buffertedtimeout = setTimeout(URComments.FilterURs(a), 500);
  2866. }
  2867.  
  2868. window.HideUR = "running";
  2869. window.BufferFillterURCommand = false;
  2870. window.buffertedtimeout2 = setTimeout(URComments.urcUREvent_onObjectsAdded("timedout"), 30000);
  2871. } else {
  2872. //urctoConsole("aborted: " + a + " " + window.HideUR);
  2873. }
  2874.  
  2875. };
  2876. };
  2877.  
  2878.  
  2879.  
  2880.  
  2881. async function GetAsyncSync(idList){
  2882. var result = await W.model.updateRequestSessions.getAsync([idList]);
  2883. //urctoConsole('GetAsyncSync done');
  2884. /*if(result != null) {
  2885. console.log("not null");
  2886. }else{
  2887. console.log("broken");
  2888. }*/
  2889. }
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896. URComments.FilterURs = function(a, b) {
  2897. return function() {
  2898. //urctoConsole("Start Filtering URs - " + a);
  2899. for (var i = 0; i < W.map.layers.length; i++) {
  2900. if (W.map.layers[i].uniqueName == 'update_requests') window.uroURLayerIdx = i;
  2901. //if(W.map.layers[i].uniqueName == 'problems') uroProblemLayerIdx = i;
  2902. //if(W.map.layers[i].name == 'Spotlight') uroMaskLayer = i;
  2903. //if(W.map.layers[i].uniqueName == 'speed_cameras') uroCamLayer = i;
  2904. //if(W.map.layers[i].name.indexOf('W.Control.SelectHighlightFeature') !== -1) uroRootContainer = W.map.layers[i].div.id;
  2905. //if(W.map.layers[i].uniqueName == 'area_managers') uroAMLayerIdx = i;
  2906. //if(W.map.layers[i].uniqueName == 'landmarks') uroPlacesRoot = W.map.layers[i].id + '_vroot';
  2907. //if(W.map.layers[i].name == 'Node Connections') uroTurnsLayerIdx = i;
  2908. }
  2909.  
  2910. var CloseDays = $('#CloseDays').val();
  2911. //check that all visible urs are loaded
  2912. var idList = [];
  2913. var allID = "";
  2914. var PushNeededCount = 0;
  2915.  
  2916. for (var urID in W.model.mapUpdateRequests.objects) {
  2917.  
  2918. if (W.model.updateRequestSessions.objects[urID] == null) {
  2919. idList.push(urID);
  2920. PushNeededCount = PushNeededCount + 1;
  2921. }
  2922.  
  2923. if (PushNeededCount > 500) {
  2924. //urctoConsole('trash grabbing updateRequestSessions with IDs ' + idList);
  2925. //W.model.updateRequestSessions.getObjectById(idList);
  2926. GetAsyncSync(idList);
  2927. idList = [];
  2928. PushNeededCount = 0;
  2929. //urctoConsole('over 1k ur');
  2930. }
  2931.  
  2932. }
  2933.  
  2934. //urctoConsole(idList);
  2935.  
  2936. if (idList.length > 0) {
  2937. //urctoConsole('trash grabbing updateRequestSessions with IDs ' + idList);
  2938. //W.model.updateRequestSessions.getObjectById(idList);
  2939. GetAsyncSync(idList);
  2940. }
  2941.  
  2942. //abort filtering URs if the list is empty
  2943. if (Object.keys(W.model.updateRequestSessions.objects).length === 0) {
  2944. window.HideUR = "stopped";
  2945. urctoConsole("no Ur in active sessions");
  2946. setTimeout(URComments.urcUREvent_onObjectsAdded("list is empty retry"), 5000);
  2947. return;
  2948. }
  2949.  
  2950. var urdescription = "";
  2951. //var EditorID = W.model.loginManager.user.id; //editor's id number
  2952. var ReminderReload = false;
  2953. var TotalVisibleURCount = 0;
  2954. var CountOfIdInList = 0;
  2955. var DelayTimeoutCountOfIdInList = 0;
  2956.  
  2957. for (var id1 in W.model.mapUpdateRequests.objects) {
  2958. TotalVisibleURCount = TotalVisibleURCount + 1;
  2959. if (URComments.onScreen(W.model.mapUpdateRequests.objects[id1])) {
  2960. allID = allID + id1 + ",";
  2961. CountOfIdInList = CountOfIdInList + 1;
  2962. }
  2963. allID = allID + "0"; //easiest way to fix the string so it does not end in a comma
  2964. if (CountOfIdInList >= 500) {
  2965. //urctoConsole("reached 500 UR requesting list: " + DelayTimeoutCountOfIdInList);
  2966. //play with putting a timeout between each group requested
  2967. setTimeout(URComments.FilterURs2(a, allID, TotalVisibleURCount), DelayTimeoutCountOfIdInList);
  2968.  
  2969. CountOfIdInList = 0;
  2970. allID = "";
  2971. DelayTimeoutCountOfIdInList = DelayTimeoutCountOfIdInList + 1000;
  2972. }
  2973. }
  2974.  
  2975. //urctoConsole("reached end of UR list requesting list: " + DelayTimeoutCountOfIdInList);
  2976. $("#URCount").html(TotalVisibleURCount);
  2977.  
  2978. setTimeout(URComments.FilterURs2(a, allID, TotalVisibleURCount), 0);
  2979. };
  2980. };
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988. URComments.FilterURs2 = function(a, allID, TotalVisibleURCount) {
  2989. return function() {
  2990. //urctoConsole("FilterURs2 TotalVisibleURCount: " + TotalVisibleURCount);
  2991.  
  2992. var CloseDays = ($('#CloseDays').val() * 1);
  2993. var ReminderDays = ($('#ReminderDays').val() * 1);
  2994. var ClosePlussReminderDays = CloseDays + ReminderDays;
  2995. var urdescription = "";
  2996. var EditorID = W.model.loginManager.user.id; //editor's id number
  2997. var ReminderReload = false;
  2998. var LoggedInEditor = W.model.loginManager.user.userName;
  2999. var openingUR;
  3000. //r = require("Waze/Feature/Vector/ProblemResolution");
  3001. urctoConsole("all ur id" + allID);
  3002. if (allID !== "") {
  3003. //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;
  3004.  
  3005. //https://www.waze.com/Descartes-live/app/MapProblems/UpdateRequests?ids=4284449
  3006. //var urSessionURL = 'https://' + window.location.host + W.Config.api_base + '/MapProblems/UpdateRequests?ids=' + allID + "&time=" + (new Date()).getTime();
  3007. //reverting back to the old url
  3008. var urSessionURL = 'https://' + window.location.host + '/Descartes-live/app/MapProblems/UpdateRequests?ids=' + allID + "&time=" + (new Date()).getTime();
  3009.  
  3010. //urctoConsole("urSessionURL: " + a + " " + urSessionURL);
  3011.  
  3012. // https://www.waze.com/Descartes-live/app/MapProblems/UpdateRequests?ids=3678676
  3013. var LastCommentorUserID = "0";
  3014.  
  3015. //urctoConsole("trash36");
  3016. $.ajax({
  3017. dataType: "json",
  3018. //dataType: 'jsonp',
  3019. url: urSessionURL,
  3020.  
  3021. success: function(json) {
  3022. try {
  3023.  
  3024. for (jsnObj = 0; jsnObj < $(json.updateRequestSessions.objects).length; jsnObj++) {
  3025. var urDetail = json.updateRequestSessions.objects[jsnObj];
  3026. var id = urDetail.id;
  3027. var skip = false;
  3028. var urStyle = 'shown';
  3029. var i = 0;
  3030. var Marked = "";
  3031. var UrcURType = "";
  3032. var urdescription = W.model.mapUpdateRequests.objects[id].attributes.description;
  3033.  
  3034. // if (urDetail.comments.length === 0) {
  3035. //type 14 is a UR
  3036. var InitialurType = W.model.mapUpdateRequests.objects[id].attributes.type;
  3037. //}
  3038.  
  3039. //urctoConsole("InitialurType: " + InitialurType + " " + id);
  3040.  
  3041. var NumberOfComments = urDetail.comments.length;
  3042. var CountsBGColor = "#FFFF99"; //light yellow
  3043.  
  3044. if (NumberOfComments > 0) {
  3045. var reporterResponse = false;
  3046. var lastCommentDateTime = 0;
  3047. var LastComment = "";
  3048.  
  3049. for (i = 0; i < urDetail.comments.length; i++) {
  3050. if (urDetail.comments[i].userID == -1) {
  3051. reporterResponse = true;
  3052. }
  3053. lastCommentDateTime = urDetail.comments[i].createdOn;
  3054. LastCommentorUserID = urDetail.comments[i].userID;
  3055. LastComment = urDetail.comments[i].text;
  3056. //only white if logged in editor has the last editor comment
  3057. if (LastCommentorUserID > 1) {
  3058. if (LastCommentorUserID === EditorID) {
  3059. CountsBGColor = "white";
  3060. } else {
  3061. CountsBGColor = "#FFFF99"; //light yellow
  3062. }
  3063. }
  3064. //NOTE, ROADWORKS, CONSTRUCTION, CLOSURE, EVENT,
  3065.  
  3066. var Commenttext = urDetail.comments[i].text;
  3067. //urctoConsole(Commenttext + " " + id);
  3068. 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) {
  3069. //urctoConsole("skipped1 URO+ tagged in comments urid: " + id + "with comment text " + Commenttext);
  3070. skip = true;
  3071. }
  3072.  
  3073. if (Commenttext.indexOf(LoggedInEditor) >= 0 && URCommentsReplaceTagWithEditorName.checked === true) {
  3074. Marked = LoggedInEditor;
  3075. } else if (Commenttext.indexOf("NOTE]") >= 0) {
  3076. Marked = "Note";
  3077. } else if (Commenttext.indexOf("ROADWORKS]") >= 0) {
  3078. Marked = "Roadworks";
  3079. } else if (Commenttext.indexOf("CONSTRUCTION]") >= 0) {
  3080. Marked = "Construction";
  3081. } else if (Commenttext.indexOf("CLOSURE]") >= 0) {
  3082. Marked = "Closure";
  3083. } else if (Commenttext.indexOf("EVENT]") >= 0) {
  3084. Marked = "Event";
  3085. }
  3086.  
  3087. if(URCommentsDontShowTaggedText.checked === true && Marked !== ""){
  3088. Marked = "DontShowTaggedText";
  3089. }
  3090.  
  3091.  
  3092. //urctoConsole("Marked " + Marked);
  3093.  
  3094. }
  3095.  
  3096. //if (LastCommentorUserID === EditorID) {
  3097. // CountsBGColor = "white";
  3098. //}
  3099.  
  3100. //urctoConsole("LastComment: " + LastComment + " " + id);
  3101. }
  3102.  
  3103. var lastCommentAge = URComments.uroDateToDays(lastCommentDateTime);
  3104. //urctoConsole('Responder: reporter response for ' + id + ' = ' + reporterResponse + ', last comment on ' + lastCommentDateTime + ', comment age in days = ' + lastCommentAge + ' number of comments = ' + i);
  3105.  
  3106. //urdescription = W.model.mapUpdateRequests.objects[id].attributes.description;
  3107. //urctoConsole("urdescription: " + urdescription + " " + id);
  3108.  
  3109. if (urdescription) {
  3110. //urctoConsole("urdescription present: " + urdescription + " " + id);
  3111. //skip tagged URs
  3112. 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) {
  3113. //urctoConsole("skipped2 URO+ tagged in description urid: " + id + "with comment text " + urdescription);
  3114. skip = true;
  3115. }
  3116.  
  3117. if (urdescription.indexOf(LoggedInEditor) >= 0 && URCommentsReplaceTagWithEditorName.checked === true) {
  3118. Marked = LoggedInEditor;
  3119. } else if (urdescription.indexOf("NOTE]") >= 0) {
  3120. Marked = "Note";
  3121. } else if (urdescription.indexOf("ROADWORKS]") >= 0) {
  3122. Marked = "Roadworks";
  3123. } else if (urdescription.indexOf("CONSTRUCTION]") >= 0) {
  3124. Marked = "Construction";
  3125. } else if (urdescription.indexOf("CLOSURE]") >= 0) {
  3126. Marked = "Closure";
  3127. } else if (urdescription.indexOf("EVENT]") >= 0) {
  3128. Marked = "Event";
  3129. } else if (urdescription.indexOf("WSLM]") >= 0) {
  3130. Marked = "WSLM";
  3131. }
  3132.  
  3133.  
  3134. if(URCommentsDontShowTaggedText.checked === true && Marked !== ""){
  3135. Marked = "DontShowTaggedText";
  3136. }
  3137.  
  3138. if (URCommentsHideWithDescript.checked == true && NumberOfComments <= 0) {
  3139. UrcURType = UrcURType + " WithDescription";
  3140. //urctoConsole("UrcURType WithDescription: " + id);
  3141. }
  3142. //urctoConsole("skipped2 tagged in description urid: " + id + "with comment text " + Commenttext);
  3143. } else {
  3144. if (URCommentsHideWithoutDescript.checked == true && NumberOfComments <= 0) {
  3145. UrcURType = UrcURType + " WithoutDescription";
  3146. //urctoConsole("UrcURType WithoutDescription: " + id);
  3147. }
  3148. }
  3149.  
  3150. if (W.model.mapUpdateRequests.objects[id].attributes.open === false) {
  3151. skip = true;
  3152. // UrcURType = "IsClosed";
  3153.  
  3154. }
  3155.  
  3156. //urctoConsole("just before skipping, skip is " + skip + " " + id);
  3157. //W.model.mapUpdateRequests.objects[id].type == "mapUpdateRequest"
  3158. if (skip === false && W.model.mapUpdateRequests.objects[id].type == "mapUpdateRequest") {
  3159.  
  3160. // && URComments.onScreen(W.model.mapUpdateRequests.objects[id])
  3161.  
  3162. if (NumberOfComments > 0) {
  3163.  
  3164. //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
  3165. if (NumberOfComments === 1 && ReminderDays > 0 && lastCommentAge >= ReminderDays && LastCommentorUserID > 1) {
  3166. //urctoConsole("URComments2 - 4day URID: " + id);
  3167. //direct link to a UR https://www.waze.com/editor/?zoom=5&lat=41.586201000000024&lon=-88.060863&layers=1957&mapUpdateRequest=4048801
  3168.  
  3169. if (URCommentsHideReminderNeeded.checked == true) {
  3170. UrcURType = UrcURType + " NeedsReminder";
  3171. }
  3172.  
  3173. if (LastCommentorUserID === EditorID && URCommentsAutoSendMyReminders.checked == true && $('[data-id="' + id + '"]').hasClass('ReminderSent') === false && EditorID > 0) {
  3174. //urctoConsole("reminder needed UR: " + LastComment + " " + id);
  3175.  
  3176. W.model.updateRequestSessions.objects[id].addComment(URCommentsArray[ReminderPosistion + 1]);
  3177.  
  3178. //toggleFollowConversation true or false
  3179. if ($("#URCommentURUnfollow").is(":checked")) {
  3180. setTimeout(URComments.toggleFollowConversation(id), 0);
  3181. }
  3182.  
  3183. URComments.ShowWMEMessage(URC_USER_PROMPT[7] + id, 2500); //"URComments: Adding reminder message to UR: "
  3184.  
  3185. //attempting to stop double reminders from being sent by adding a class that we can check for before sending the reminder
  3186. $('[data-id="' + id + '"]').addClass('ReminderSent');
  3187.  
  3188. //set to hide if hide in between states is checked
  3189. if (URCommentsHideInbetween.checked == true) {
  3190. UrcURType = UrcURType + " InBetweenStates";
  3191. }
  3192.  
  3193. }
  3194.  
  3195.  
  3196. //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
  3197.  
  3198. } else if ((NumberOfComments >= 2 && lastCommentAge >= CloseDays && LastCommentorUserID > 1) || (NumberOfComments >= 1 && ReminderDays == 0 && lastCommentAge >= CloseDays && LastCommentorUserID > 1)) {
  3199. //urctoConsole("close needed UR: " + LastComment + " " + id);
  3200.  
  3201. //hide or show UR that need closing
  3202. if (URCommentsHideCloseNeeded.checked == true && UrcURType === "") {
  3203. UrcURType = UrcURType + " NeedsClose";
  3204. }
  3205.  
  3206. //everyones stale 2 comment URS
  3207.  
  3208.  
  3209. } else if (LastCommentorUserID > 0) {
  3210. //in between states waiting for replies or time to elapse
  3211. //urctoConsole("hiding ur 2: " + id);
  3212. if (URCommentsHideInbetween.checked == true) {
  3213. UrcURType = UrcURType + " InBetweenStates";
  3214. }
  3215. }
  3216.  
  3217. //last comment was a user reply; change the pin color to blue or peach
  3218. if (LastCommentorUserID < 1) {
  3219. if (CountsBGColor == "white") {
  3220. CountsBGColor = "#79B5C7"; //light blue
  3221. } else {
  3222. CountsBGColor = "#FFCC99"; //peach
  3223. }
  3224.  
  3225. if (URCommentsHideReplies.checked == true) {
  3226. UrcURType = UrcURType + " HasUserReplies";
  3227. }
  3228.  
  3229. } else if (lastCommentAge > ClosePlussReminderDays && CountsBGColor !== "white") {
  3230. CountsBGColor = "#FF8B8B"; //light red
  3231. }
  3232.  
  3233. //yellow at close days workaround
  3234. //urctoConsole("yellow at close days workaround " + CountsBGColor + " NumberOfComments: " +NumberOfComments + "lastCommentAge: " +lastCommentAge + " CloseDays" + CloseDays + " LastCommentorUserID: " + LastCommentorUserID + "urid: " + id);
  3235. //alert("yellow at close days workaround " + CountsBGColor + " NumberOfComments: " +NumberOfComments + "lastCommentAge: " +lastCommentAge + " CloseDays" + CloseDays + " ReminderDays: " + ReminderDays + " LastCommentorUserID: " + LastCommentorUserID + "urid: " + id);
  3236.  
  3237. if (CountsBGColor == "#FFFF99" && NumberOfComments >= 1 && lastCommentAge >= ClosePlussReminderDays && LastCommentorUserID > 1) {
  3238. CountsBGColor = "#FF8B8B"; //light red
  3239. }
  3240. /*
  3241. if (CountsBGColor == "#FFFF99") {
  3242. if (ReminderDays === 0 && NumberOfComments >= 1 && lastCommentAge >= CloseDays && LastCommentorUserID > 1) {
  3243. CountsBGColor = "#FF8B8B"; //light red
  3244. } else if (ReminderDays > 0 && NumberOfComments >= 1 && lastCommentAge >= CloseDays && LastCommentorUserID > 1) {
  3245. CountsBGColor = "#CC00FF"; //light red
  3246. }
  3247. }
  3248. */
  3249.  
  3250.  
  3251.  
  3252.  
  3253. }
  3254. //zero comments
  3255. } else {
  3256. //urctoConsole("skipped UR: " + id);
  3257. }
  3258. //skipped
  3259. //urctoConsole("check for urcounts class; comment count " + i );
  3260. //urctoConsole("trash58");
  3261.  
  3262. if (lastCommentAge === undefined) {
  3263. lastCommentAge = "?";
  3264. }
  3265.  
  3266. var Message = "";
  3267.  
  3268. if (Marked == "DontShowTaggedText" ){
  3269. Message = i + "c " + lastCommentAge + "d";
  3270. CountsBGColor = "#CCCCCC"; //light grey
  3271. } else if (Marked !== "") {
  3272. Message = Marked + " " + i + "c";
  3273. CountsBGColor = "#CCCCCC"; //light grey
  3274. } else {
  3275. Message = i + "c " + lastCommentAge + "d";
  3276. }
  3277.  
  3278. //urctoConsole("message " + Message);
  3279. //urctoConsole("Marked " + Marked);
  3280.  
  3281.  
  3282. //if the ur is tagged or has more than 0 comments reorder the ur stacking
  3283. if (Marked !== "" || i > 0) {
  3284.  
  3285. var MessageOffset = Message.length;
  3286. if (MessageOffset < 10) {
  3287. MessageOffset = MessageOffset * 1.4;
  3288. } else {
  3289. MessageOffset = MessageOffset * 2.3;
  3290. }
  3291. MessageOffset = "-" + MessageOffset + "px";
  3292. //urctoConsole("message " + Message);
  3293. if (CountsBGColor == "#CCCCCC") { //light grey
  3294. $('[data-id="' + id + '"]').css({
  3295. 'z-index': '999'
  3296. });
  3297. } else if (CountsBGColor == "white" || CountsBGColor == "#79B5C7") {
  3298. $('[data-id="' + id + '"]').css({
  3299. 'z-index': '998'
  3300. });
  3301. //).style.visibility
  3302. } else if (CountsBGColor == "#FF8B8B") { //light red
  3303. $('[data-id="' + id + '"]').css({
  3304. 'z-index': '997'
  3305. });
  3306. }
  3307. if (URCommentsPillEnabled.checked === true) {
  3308. //add URC bubble
  3309. if ($('[data-id="' + id + '"] .URCounts').hasClass('URCounts') === false) {
  3310. $('[data-id="' + id + '"]').append($("<div>").css("clear", "both")
  3311. .css("margin-bottom", "10px")
  3312.  
  3313. .append($("<div>").html(Message)
  3314. .css("color", "black")
  3315. .css("background", CountsBGColor)
  3316. .css("position", "absolute")
  3317. .css("top", "30px")
  3318. .css("right", MessageOffset)
  3319.  
  3320. .css("display", "block")
  3321. .css("width", "auto")
  3322. .css("white-space", "nowrap")
  3323. .css("padding-left", "5px")
  3324. .css("padding-right", "5px")
  3325.  
  3326. .css("border", "1px solid")
  3327. .css("border-radius", "25px")
  3328.  
  3329. .addClass('URCounts')
  3330. )
  3331. );
  3332.  
  3333. } else {
  3334. $('[data-id="' + id + '"] .URCounts').html(Message);
  3335. $('[data-id="' + id + '"] .URCounts').css("background", CountsBGColor);
  3336. $('[data-id="' + id + '"] .URCounts').css("right", MessageOffset);
  3337. }
  3338.  
  3339. //end of URC bubble
  3340. }
  3341. }
  3342.  
  3343.  
  3344. //console.log(a);
  3345.  
  3346. //URC UR Filtering
  3347.  
  3348. var uroURFiltersActive = false; // var used to keep track if we actually need to show / hide the UR pins
  3349.  
  3350. if (sessionStorage.UROverview_hasActiveURFilters == undefined) {
  3351. //condsole.log("old version of URO, need to use existing UI-parsing test...");
  3352.  
  3353. //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
  3354. 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")) {
  3355. uroURFiltersActive = true; //at least one of URO's UR checkboxes were enabledPlugin
  3356. }
  3357. } else if (sessionStorage.UROverview_hasActiveURFilters == "true") {
  3358. //console.log("new version of URO is actively filtering UR markers...");
  3359. uroURFiltersActive = true; //twisters URO active filter bit is set to true
  3360. }
  3361.  
  3362.  
  3363. if (uroURFiltersActive === true && URCommentsFilterEnabled.checked === true) {
  3364. URComments.ShowWMEMessage(URC_USER_PROMPT[8], 5000); //"URComment's UR Filtering has been disabled because URO\'s UR filters are active."
  3365. $('#URCommentsFilterEnabled').prop('checked', false);
  3366. $(localStorage.setItem('URCommentsFilterEnabled', URCommentsFilterEnabled.checked));
  3367. }
  3368.  
  3369. if (URCommentsFilterEnabled.checked == true && uroURFiltersActive === false) {
  3370. //check if we should hide URO stype tagged UR
  3371. if (URCommentsHideNotes.checked == true && Marked !== "") {
  3372. UrcURType = UrcURType + " IsTagged";
  3373. } else if (Marked !== "" && UrcURType !== "IsClosed") {
  3374. UrcURType = UrcURType + " 1";
  3375. }
  3376.  
  3377. //check if not "my" ur
  3378. //if(URCommentsHideNotMyUR.checked == true && NumberOfComments > 0 && lastCommentAge <= CloseDays ){
  3379. if (URCommentsHideNotMyUR.checked == true && NumberOfComments > 0) {
  3380. //light red, peach, light yellow
  3381. //if(CountsBGColor == "#FF8B8B" || CountsBGColor == "#FFCC99" || CountsBGColor == "#FFFF99"){
  3382. if (CountsBGColor == "#FFCC99" || CountsBGColor == "#FFFF99" || CountsBGColor == "#FF8B8B") {
  3383. UrcURType = UrcURType + " NotMyUR";
  3384. }
  3385. }
  3386. //URCommentsShowPastClose
  3387. //check if not "my" ur
  3388. if (URCommentsShowPastClose.checked == true && NumberOfComments > 0 && lastCommentAge > ClosePlussReminderDays) {
  3389. //light red, peach, light yellow
  3390. //if(CountsBGColor == "#FF8B8B" || CountsBGColor == "#FFCC99" || CountsBGColor == "#FFFF99"){
  3391. if (CountsBGColor == "#FFCC99" || CountsBGColor == "#FFFF99" || CountsBGColor == "#FF8B8B") {
  3392. if(UrcURType.indexOf("HasUserReplies") < 0){
  3393. UrcURType = " ShowPastClose";
  3394. }
  3395. }
  3396. }
  3397.  
  3398. //initial UR no comments
  3399. if (urDetail.comments.length === 0 && URCommentsHideInital.checked == true) {
  3400. UrcURType = UrcURType + " initial";
  3401. }
  3402.  
  3403.  
  3404. //urctoConsole('UrcURType: ' + UrcURType);
  3405.  
  3406. //show or hide URs|| NumberOfComments > 3 || NumberOfComments < 3
  3407.  
  3408. if (W.model.mapUpdateRequests.objects[id].attributes.open === false) {
  3409. if (URCommentsHideClosed.checked == true) {
  3410. UrcURType = UrcURType + " IsClosed";
  3411. } else {
  3412. UrcURType = UrcURType + " ClosedNotHiden";
  3413. }
  3414. }
  3415.  
  3416. if (UrcURType.indexOf("IsTagged") > 0) { //|| NumberOfComments > 2
  3417. //urctoConsole('UR is tagged and set to be hidden');
  3418. urStyle = 'hidden';
  3419.  
  3420. } else if (UrcURType.indexOf("InBetweenStates") > 0 || UrcURType.indexOf("NeedsReminder") > 0 || UrcURType.indexOf("NeedsClose") > 0 || UrcURType.indexOf("initial") > 0 || UrcURType.indexOf("HasUserReplies") > 0 || UrcURType.indexOf("IsClosed") > 0 || UrcURType.indexOf("NotMyUR") > 0 || UrcURType.indexOf("WithoutDescription") > 0 || UrcURType.indexOf("WithDescription") > 0 ) {
  3421. urStyle = 'hidden';
  3422. } else {
  3423. urStyle = 'visible';
  3424. }
  3425. //console.log("id: " + id + " UrcURType: " + UrcURType + " urStyle: " + urStyle + " Marked: " + Marked);
  3426.  
  3427. //W.map.layers[uroURLayerIdx].markers[id].icon.imageDiv.style.visibility = urStyle;
  3428. $('[data-id="' + id + '"]').css("visibility", urStyle);
  3429. //urctoConsole('next ur ' + id);
  3430.  
  3431. //when filtering is disable and URO filters are disabled reshow all the UR
  3432. } else if (URCommentsFilterEnabled.checked == false && uroURFiltersActive === false) {
  3433. //urctoConsole('UR filtering is disabled showing all ur ' + id);
  3434. urStyle = 'visible';
  3435. // W.map.layers[uroURLayerIdx].markers[id].icon.imageDiv.style.visibility = urStyle;
  3436. $('[data-id="' + id + '"]').css("visibility", urStyle);
  3437. }
  3438.  
  3439.  
  3440. }
  3441. window.HideUR = "stopped";
  3442. //urctoConsole('rem done filtering UR, Total UR: ' + TotalVisibleURCount);
  3443.  
  3444. //URComments.ShowWMEMessage("URComments: Machete808Count: " + window.Machete808Count,600000);
  3445. //alert(CountsBGColor);
  3446.  
  3447. } catch (e) {
  3448.  
  3449. setTimeout(URComments.FilterURs('error retry'), 1000);
  3450. //urctoConsole('Responder: error obtaining UR response = ' + e);
  3451. //window.HideUR = "stopped";
  3452. }
  3453. }
  3454. });
  3455. //urctoConsole("" + a + " total visible: " + TotalVisibleURCount); // + " allID " + allID);
  3456. //window.HideUR = "stopped";
  3457.  
  3458. } else {
  3459. //urctoConsole("no UR aborting");
  3460. window.HideUR = "stopped";
  3461. }
  3462. urctoConsole("FilterURs2 done");
  3463. };
  3464. };
  3465.  
  3466. URComments.OpenNextUR = function(message, delay) {
  3467. return function() {
  3468. setTimeout(URComments.OpenNextUR(a, allID, TotalVisibleURCount), 0);
  3469.  
  3470. };
  3471. };
  3472.  
  3473. URComments.ShowWMEMessage = function(message, delay) {
  3474. //if ($("#URCMapNote").length <= 0){
  3475.  
  3476. //delay = 10000;
  3477.  
  3478. var dateNow = new Date();
  3479. TrickRemove = dateNow.getTime();
  3480.  
  3481. //var message = "URComments UR Filtering has been disabled because URO\'s UR filters are active.";
  3482. //var message = "URComments: Can not find the comment box! In order for this script to work you need to have a user request open."
  3483. //var message = "URComments: Adding reminder message to UR: 4239896"
  3484. //delay = 10000;
  3485. //message = "test";
  3486. var width = message.length * 10;
  3487.  
  3488. //message holder div
  3489. var c = '<div id="URCMessage" style="width: 100%; font-size: 15px; font-weight: bold; margin-left: auto; margin-right: auto; position: absolute; top: 0px; left: 10px; z-index: 1000;"></div>';
  3490. $("#map").append(c);
  3491.  
  3492. //message div
  3493. var d = '<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>';
  3494. $("#URCMessage").append(d);
  3495.  
  3496. //remove messages after the duration has passed
  3497. $("#URCMapNote" + TrickRemove).show().delay(delay).queue(function(n) {
  3498. $(this).remove();
  3499. n();
  3500. });
  3501. //}
  3502. };
  3503.  
  3504.  
  3505.  
  3506. /*
  3507. CountsBGColor = "#FFFF99"; //light yellow = UR that are waiting for the last editor but still has time before the Close days setting ex 7 days
  3508. CountsBGColor = "#CCCCCC"; //light grey = URO styled notes ex [NOTE]
  3509. CountsBGColor = "#FFCC99"; //peach = another editor before the close days has gone by has user reply
  3510. CountsBGColor = "#FF8B8B"; //light red = past the close days setting and is now able to be taken over by another editor
  3511. CountsBGColor = "white"; = UR that "belong to the editor logged in that need work
  3512. CountsBGColor = "#79B5C7"; //light blue = UR that "belong to the editor logged in that have user replies
  3513.  
  3514.  
  3515. White = The editor logged in has comments on the UR and the UR needs work
  3516. light blue = The editor logged in has comments on the UR and the UR's last comment was a user reply
  3517. light red = past the close days setting and is now able to be taken over by another editor
  3518.  
  3519. 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)
  3520. peach = UR that another editor had commented on but the last comment is a user reply
  3521.  
  3522. light grey = URO styled notes ex [NOTE]
  3523.  
  3524. */
  3525.  
  3526.  
  3527.  
  3528. //save what comment list is selected and then build the tab
  3529. URComments.BoilerPlateCreatorsFunction = function() {
  3530.  
  3531. if (BoilerPlateCreators.value !== "---User's Lists---" && BoilerPlateCreators.value !== "---Loading---" && urcListLoaded) {
  3532.  
  3533. //unset all the previuos lists kb shortcuts
  3534. var ScriptName = 'URC' + localStorage.getItem('BoilerPlateCreators');
  3535. for (var name in W.accelerators.Actions) {
  3536. if (W.accelerators.Actions[name].group == ScriptName) {
  3537. W.accelerators.Actions[name].enabled = false;
  3538. }
  3539. }
  3540.  
  3541.  
  3542. //save the selection
  3543. localStorage.setItem('BoilerPlateCreators', BoilerPlateCreators.value);
  3544.  
  3545. //clear the html from the tabs
  3546. $("#sidepanel-Comments").html('');
  3547. //reload the content
  3548. ChangeLanguage = true;
  3549.  
  3550. //setTimeout(URComments_bootstrap, 20);
  3551. URComments_bootstrap();
  3552. } else {
  3553. if (SelectedBoilerPlateCreator === "LoadingSelected" || !urcListLoaded) {
  3554. $("#BoilerPlateCreators").val("---Loading---");
  3555. } else {
  3556. $("#BoilerPlateCreators").val(localStorage.getItem('BoilerPlateCreators'));
  3557. }
  3558. }
  3559. };
  3560.  
  3561.  
  3562. URComments.URCommentZoomOutcheck = function(Title, URStatus) {
  3563. return function() {
  3564. //urctoConsole("zoom out URCommentZoomOutcheck");
  3565.  
  3566. //this is the new place for zooming out and will still be happening while the comment is sending
  3567. //zoom out option - if the user option is set to reload map after posting a comment reply
  3568. if (UrCommentZoomOutAfterComment.checked === true) {
  3569. //urctoConsole("zoom out ZoomOutAfterComment enabled");
  3570. setTimeout(URComments.SetZoomCloseUR(ReturnToCurrentZoom, "LeaveOpen"), 0);
  3571. } else {
  3572. //alert("autozoomout not checked");
  3573. }
  3574. setTimeout(URComments.URCommentSendBtnClicked(Title, URStatus), 20);
  3575. };
  3576. };
  3577.  
  3578. URComments.URCommentSendBtnClicked = function(Title, URStatus) {
  3579.  
  3580. //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
  3581. // so we wait 1500 milliseconds before looking for the close button
  3582. //since we are passing vars to the next function we have to pass this to handler function so it doesn't happen on click
  3583.  
  3584. //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
  3585. return function() {
  3586. //grab the close button to compare to later
  3587. CloseButtonHolder = $(".problem-panel-navigation button.close-button");
  3588.  
  3589. //check to see if the comments went through before saving or closing the comment
  3590. if ($(".new-comment-text").val() !== "" && $(".new-comment-text").val() !== undefined) {
  3591. //urctoConsole('the send button was clicked, Waiting for the comment to send. ' + PauseCount);
  3592. //urctoConsole("current comment = " + $(".new-comment-text").val());
  3593. //urctoConsole("current comment = ");
  3594. PauseCount++;
  3595. setTimeout(URComments.URCommentSendBtnClicked(Title, URStatus), 20);
  3596. } else {
  3597. //urctoConsole('The comment went through, jumping to CloseDelayHack2');
  3598. PauseCount = "1";
  3599.  
  3600. //check if we want to unfollow
  3601. if ($("#URCommentURUnfollow").is(":checked") && $("#follow-on").is(":checked")) {
  3602. //$('#follow-on').trigger('click');
  3603. //setTimeout(URComments.URCommentSendBtnClicked(Title, URStatus), 20);
  3604. var urID = $(".update-requests .selected").data("id");
  3605. //urctoConsole("toggleFollowConversation id " + urID);
  3606. //W.model.updateRequestSessions.objects[urID].toggleFollowConversation('false');
  3607. setTimeout(URComments.toggleFollowConversation(urID), 500);
  3608. }
  3609. //delay this command for uro not to freakout on refreshing uro bubble ur count
  3610. setTimeout(URComments.CloseDelayHack2(Title, URStatus), 100);
  3611.  
  3612. }
  3613. };
  3614. };
  3615.  
  3616.  
  3617. URComments.toggleFollowConversation = function(urID) {
  3618. return function() {
  3619. //urctoConsole("toggleFollowConversation id " + urID);
  3620. W.model.updateRequestSessions.objects[urID].toggleFollowConversation('false');
  3621. };
  3622. };
  3623.  
  3624.  
  3625. //this checks to see if the Waze's save button is waiting to be clicked.
  3626. //currently unused
  3627. URComments.WazeSaveWaiting = function() {
  3628. if ($(".WazeControlSave").hasClass('ItemInactive')) {
  3629. return true;
  3630. } else {
  3631. return false;
  3632. }
  3633. };
  3634.  
  3635. URComments.CloseDelayHack2 = function(Title, URStatus) {
  3636. return function() {
  3637. //urctoConsole("CloseDelayhack2 " + Title + " " + URStatus);
  3638.  
  3639. PauseCount = "1";
  3640. //urctoConsole("New close button");
  3641. //wrap the code in the finding of the new close button
  3642.  
  3643. //now that we found the new close button and send was clicked
  3644.  
  3645. //lets check if we should click close or save
  3646. //when clicking save you dint need to click close
  3647.  
  3648. //this checks to see if the Waze's save button is waiting to be clicked.
  3649. //URComments.WazeSaveWaiting()
  3650.  
  3651. if (URStatus.toLowerCase() === "solved" || URStatus.toLowerCase() === "notidentified") {
  3652. //urctoConsole("CloseDelayhack2 Solved or NotIdentified- Clicking Save");
  3653. //this clicks the waze save btn
  3654. if (URCommentAutoClickURStatus.checked === true && UrCommentSaveAfterComment.checked === true) {
  3655. //click save
  3656. //$('#toolbar #edit-buttons .WazeControlSave').trigger('click');
  3657.  
  3658. //from Cardyin 5/26/2016
  3659. $('.toolbar-button.waze-icon-save').trigger('click');
  3660. } else if (UrCommentAutoCloseComment.checked) {
  3661. //$(".problem-panel-navigation button.close-button").trigger('click');
  3662. $("#panel-container > div > div > div.top-section > a").trigger('click');
  3663. }
  3664.  
  3665. } else {
  3666. //when not saving you have to click close.
  3667. //urctoConsole("CloseDelayhack2 since we are not saving click the close button");
  3668. if (UrCommentAutoCloseComment.checked) {
  3669. //urctoConsole("CloseDelayhack2 auto close option checked");
  3670.  
  3671.  
  3672. //normal editor
  3673. if ($("#panel-container > div > div > div.top-section > a").length !== 0) {
  3674. $("#panel-container > div > div > div.top-section > a").trigger('click');
  3675. }
  3676.  
  3677. //beta editor
  3678. if ($(".problem-edit .header .close-panel").length !== 0) {
  3679. //urctoConsole("zoom out CloseDelayHack2 beta editor");
  3680. $(".problem-edit .header .close-panel").trigger('click');
  3681. //setTimeout(function() {
  3682. // $('a .close-popover').trigger('click');
  3683. // }, 2000);
  3684. }
  3685.  
  3686. //since saving above reloads the map we need this reload only to happen when we dont click save
  3687. //auto reload map for non save urs
  3688. //if (UrCommentAutoReloadAfterComment.checked) {
  3689. // setTimeout(URComments.AutoReloadMapOnComment, 500);
  3690. //}
  3691. }
  3692. }
  3693.  
  3694. //urctoConsole("end of saving or closing comment");
  3695. //}
  3696.  
  3697. //this is the new place for zooming out and will still be happening while the comment is sending
  3698. //zoom out option - if the user option is set to reload map after posting a comment reply
  3699. if (UrCommentZoomOutAfterComment.checked === true) {
  3700. //urctoConsole("zoom out CloseDelayHack2");
  3701. setTimeout(URComments.SetZoomCloseUR(ReturnToCurrentZoom, "LeaveOpen"), 0);
  3702. } else {
  3703. //alert("autozoomout not checked");
  3704. }
  3705.  
  3706. setTimeout(URComments.urcUREvent_onObjectsAdded('URCommentsReload'), 0);
  3707.  
  3708. };
  3709. };
  3710.  
  3711. URComments.SetZoomCloseUR = function(a, b) {
  3712. //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);
  3713. //the closest zoom that shows the sat and map is zoom 9
  3714. return function() {
  3715. //urctoConsole("Setting map zoom to: " + a + " with flag: " + b);
  3716. //alert(a + " " + b);
  3717. W.map.setCenter(W.map.getCenter(), a);
  3718. //close ur if zooming out to
  3719. if (b === "CloseUR") {
  3720. //alert(b);
  3721.  
  3722. //normal editor
  3723. /* if ($(".problem-panel-navigation button.close-button").length !== 0) {
  3724. $(".problem-panel-navigation button.close-button").trigger('click');
  3725. }
  3726. */
  3727. //beta editor
  3728. if ($(".problem-edit .header .close-panel").length !== 0) {
  3729. $(".problem-edit .header .close-panel").trigger('click');
  3730. // setTimeout(function() {
  3731. // $('a .close-popover').trigger('click');
  3732. // }, 2000);
  3733. }
  3734. }
  3735. };
  3736. };
  3737.  
  3738. URComments.AutoReloadMapOnComment = function() {
  3739. //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.
  3740. // 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
  3741. //click the reload button for the map
  3742. $(".controls-container .fa-repeat.reload-button").trigger('click');
  3743. };
  3744.  
  3745. URComments.ConfirmToConsole = function() {
  3746. //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!
  3747. nconfirm = confirm;
  3748. confirm = function(msg) {
  3749. //if ((I18n.translations[I18n.locale].update_requests.panel.confirm == msg) && (uroGetCBChecked('_cbDisablePendingQuestions') == true)) {
  3750. //urctoConsole('URComment confirm redirected to console: ' + msg);
  3751. return true;
  3752. };
  3753. };
  3754.  
  3755. URComments.RestoreConfirmToConfirm = function() {
  3756. //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!
  3757. confirm = nconfirm;
  3758. };
  3759.  
  3760. URComments.AutoZoomIN = function(Title, Comment, URStatus, urID, AutoSendComment) {
  3761. return function() {
  3762. //urctoConsole("AutoZoomIN");
  3763. var URCommentsUnsavedDetected = false;
  3764. var URCommentsUnsaveCount = $(".WazeControlSave .counter").html();
  3765.  
  3766. //detect unsaved changed if there are and the auto save option is on abort adding comments to the UR
  3767. if (URCommentsUnsaveCount > 0 && $("#UrCommentSaveAfterComment").is(":checked") && URStatus.toLowerCase() !== "open") {
  3768. URCommentsUnsavedDetected = true;
  3769. 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."
  3770. }
  3771. //URCommentsUnsavedDetected = true;
  3772.  
  3773. //get urid for manually clicked comments
  3774. if (urID === 0 || urID === "" || urID === undefined) {
  3775. urID = $(".update-requests .selected").data("id");
  3776. }
  3777.  
  3778. //check to see if the auto zoom in option in enabled if it is start the zooming in process
  3779. //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);
  3780. //having OneOrTheOTher first is a hack to make the logic work
  3781. var OneOrTheOTher = "no";
  3782.  
  3783. if (UrCommentNewZoomIn.checked === true && Title !== URCommentsArray[ReminderPosistion] && Title !== URCommentsArray[CloseNotIdentifiedPosistion] && AutoSendComment !== "AutoSendComment") {
  3784. OneOrTheOTher = "yes";
  3785. }
  3786.  
  3787. //alert(OneOrTheOTher);
  3788. if (OneOrTheOTher === "yes" && URCommentsUnsavedDetected === false) {
  3789.  
  3790. //urctoConsole("AutoZoomIN zooming to location");
  3791.  
  3792. //predefined zoom threshold for auto zoom
  3793. var zoom = 4;
  3794.  
  3795. //do not zoom back out if we are already zoomed in and just happen to be re-clicking on a UR.
  3796. //or we have the map set good for a 4-day reminder
  3797. var WazeCurrentZoom = URComments.GetWazeMapZoomLevel();
  3798.  
  3799. if (WazeCurrentZoom < zoom) {
  3800. URComments.gotoURById(urID, 5);
  3801. }
  3802.  
  3803. //setTimeout(URComments.AutoZoomIN2(Title, Comment, URStatus), 2500);
  3804. setTimeout(URComments.PostURComment(Title, Comment, URStatus, AutoSendComment, urID), 1);
  3805.  
  3806. } else if (URCommentsUnsavedDetected === false) {
  3807.  
  3808. //auto zoom in is disabled jump to postURComment
  3809. //alert("else");
  3810. //urctoConsole("AutoZoomIN disabled to PostURComment id - " + urID);
  3811. //we have to use set timeout here because we need the return function() in PostURComment
  3812. //for when we are zooming in and out for the reminder
  3813. //since we are not zooming here jump rigth to PostURComment
  3814. setTimeout(URComments.PostURComment(Title, Comment, URStatus, AutoSendComment, urID), 1);
  3815. }
  3816.  
  3817. };
  3818. };
  3819.  
  3820.  
  3821. URComments.CrossHairsClicked = function(urID, zoom) {
  3822. return function() {
  3823. setTimeout(URComments.gotoURById(urID, 5), 500);
  3824. };
  3825. };
  3826.  
  3827.  
  3828. URComments.gotoURById = function(urID, zoom) {
  3829. //alert(urID);
  3830. //$('span[id="WME_AutoUR_Count"]').html((WMEAutoUR.Auto.index+1)+"/"+WMEAutoUR.Auto.UR_len);
  3831. //save zoom so we can return this the current zoom level
  3832. ReturnToCurrentZoom = URComments.GetWazeMapZoomLevel();
  3833.  
  3834. var x;
  3835. if(W.model.mapUpdateRequests.objects[urID].attributes.geometry.realX === undefined){ //uro fix
  3836. x = W.model.mapUpdateRequests.objects[urID].attributes.geometry.x;
  3837. } else {
  3838. x = W.model.mapUpdateRequests.objects[urID].attributes.geometry.realX; //uro fix
  3839. }
  3840. //var x = W.model.mapUpdateRequests.objects[urID].attributes.geometry.x;
  3841. var y = W.model.mapUpdateRequests.objects[urID].attributes.geometry.y;
  3842.  
  3843. //urctoConsole("gotoURById: " + "x: " + x + "y: " + y + "zoom: " + zoom);
  3844.  
  3845. W.map.setCenter([x, y], zoom);
  3846. return;
  3847. };
  3848.  
  3849. URComments.GetWazeMapZoomLevel = function(Title, Comment, URStatus) {
  3850. zoom = W.map.mapState.mapLocation.zoom;
  3851. //urctoConsole("Current Zoom: " + zoom);
  3852. return zoom;
  3853. };
  3854.  
  3855.  
  3856. URComments.WaitForURtoOpen = function(Title, Comment, URStatus, urID, AutoSendComment) {
  3857. return function() {
  3858. //urctoConsole("WaitForURtoOpen");
  3859. if ($(".new-comment-text")[0]) {
  3860. setTimeout(URComments.AutoZoomIN(Title, Comment, URStatus, urID, AutoSendComment), 500);
  3861. } else {
  3862. setTimeout(URComments.WaitForURtoOpen(Title, Comment, URStatus, urID, AutoSendComment), 200);
  3863. }
  3864. };
  3865. };
  3866.  
  3867.  
  3868. URComments.PostURComment = function(Title, Comment, URStatus, AutoSendComment, urID) {
  3869. // the user clicked on a comment link
  3870. return function() {
  3871. //Swap out special text
  3872. Comment = URComments.StringSwap(Comment);
  3873. //urctoConsole("attaching to send button " + Title + " - " + Comment + " - " + URStatus);
  3874.  
  3875. //add event listener that runs most of the options = URCommentZoomOutcheck
  3876. //$('.new-comment-form .new-comment-text + .btn-default').click(URComments.URCommentZoomOutcheck(Title, URStatus));
  3877.  
  3878. $('.new-comment-form .send-button').click(URComments.URCommentZoomOutcheck(Title, URStatus));
  3879.  
  3880. //check if the comment text area is present if not alert the user to open a UR
  3881. if ($(".new-comment-text")[0]) {
  3882. //urctoConsole('found comment box ' + Title + ' - ' + Comment);
  3883. $(".new-comment-text").val(Comment).change();
  3884. $('.new-comment-text').keyup();
  3885. // $($('textarea.new-comment-text').get(0)).change();
  3886. //click the Ur status
  3887. setTimeout(URComments.CheckIfClickStatus(URStatus, AutoSendComment), 100);
  3888. } else {
  3889. //we were unable to find an open UR
  3890. 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."
  3891. }
  3892. };
  3893. };
  3894.  
  3895. //this is part of the script that gets the maps position for the 4 day reminder map link
  3896. getQueryString = function(link, name) {
  3897. var pos = link.indexOf(name + '=') + name.length + 1;
  3898. var len = link.substr(pos).indexOf('&');
  3899. if (-1 == len) len = link.substr(pos).length;
  3900. return link.substr(pos, len);
  3901. };
  3902.  
  3903. URComments.CheckIfClickStatus = function(URStatus, AutoSendComment) {
  3904. return function() {
  3905. //urctoConsole("checking ur status function: " + URStatus + " " + AutoSendComment);
  3906.  
  3907. if (URCommentAutoClickURStatus.checked === true) {
  3908. //urctoConsole("URCommentAutoClickURStatus = true");
  3909. //bypass the confirm function so other site messages do not come up!
  3910. URComments.ConfirmToConsole();
  3911.  
  3912. //click the ur status options (Not identified solved, open)
  3913. if ($("input[value='open']").length !== 0) {
  3914. //urctoConsole("open !== 0");
  3915.  
  3916. $(".problem-edit .body").scrollTop($(".problem-edit .body")[0].scrollHeight);
  3917.  
  3918. //urctoConsole("scrollTop");
  3919.  
  3920. if (URStatus.toLowerCase() == "notidentified") {
  3921. //urctoConsole("notidentified click");
  3922. //click Not identified
  3923. //$("#state-not-identified-9").trigger('click');
  3924. $("input[value='not-identified']").trigger('click');
  3925. } else if (URStatus.toLowerCase() == "solved") {
  3926. //urctoConsole("solved click");
  3927. //click solved
  3928. //$("#state-solved-8").trigger('click');
  3929. $("input[value='solved']").trigger('click');
  3930. } else {
  3931. //urctoConsole("open click");
  3932. //click back on open just encase the wrong reply was clicked previously
  3933. //$("#state-open-7").trigger('click');
  3934. $("input[value='open']").trigger('click');
  3935. }
  3936. }
  3937.  
  3938. //restores confirm function so other site messages come up!
  3939. URComments.RestoreConfirmToConfirm();
  3940. //wait for the status to change
  3941. }
  3942.  
  3943. if (AutoSendComment === "AutoSendComment") {
  3944. //urctoConsole("AutoSendComment");
  3945. setTimeout(URComments.URVerfiyStatusSet(URStatus, AutoSendComment), 1);
  3946. }
  3947. };
  3948. //urctoConsole("end of CheckIfClickStatus");
  3949. };
  3950.  
  3951. URComments.URVerfiyStatusSet = function(URStatus, AutoSendComment) {
  3952. return function() {
  3953. //urctoConsole("URVerfiyStatusSet function: " + URStatus + " " + AutoSendComment);
  3954. var URStatusOk = true;
  3955.  
  3956. if (URCommentAutoClickURStatus.checked === true) {
  3957.  
  3958. if (URStatus.toLowerCase() == "notidentified") {
  3959. //click Not identified
  3960. if ($("input[value='not-identified']").is(":checked") == false) {
  3961. URStatusOk = false;
  3962. }
  3963. } else if (URStatus.toLowerCase() == "solved") {
  3964. //click solved
  3965. if ($("input[value='solved']").is(":checked") == false) {
  3966. URStatusOk = false;
  3967. }
  3968. } else {
  3969. //click back on open just encase the wrong reply was clicked previously
  3970. if ($("input[value='open']").is(":checked") == false) {
  3971. URStatusOk = false;
  3972. }
  3973. }
  3974.  
  3975. }
  3976.  
  3977. if (URStatusOk == true) {
  3978. setTimeout(URComments.AutoClickSend(URStatus, AutoSendComment), 10);
  3979. } else {
  3980. //urctoConsole("UR Status has yet to change waiting 250ms");
  3981. setTimeout(URComments.URVerfiyStatusSet(URStatus, AutoSendComment), 150);
  3982. }
  3983.  
  3984. };
  3985. };
  3986.  
  3987. URComments.AutoClickSend = function(URStatus, AutoSendComment) {
  3988. return function() {
  3989. //urctoConsole("checking if we are auto clicking the send button");
  3990. if (AutoSendComment === "AutoSendComment") {
  3991. //urctoConsole("Auto clicking the send button");
  3992. //$('.new-comment-form .new-comment-text + .btn-default').trigger('click');
  3993. $('.new-comment-form .send-button').trigger('click');
  3994.  
  3995.  
  3996. }
  3997. };
  3998. };
  3999.  
  4000. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4001. ////
  4002. //// on start-up keep checking the site to see if the me tab is loaded
  4003. ////
  4004. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4005.  
  4006. URComments.startcode = function() {
  4007. // Check if WME is loaded, if not, waiting a moment and checks again. if yes init URComments
  4008. //try {
  4009. //look for the me tab instead if the buggy chat room!
  4010.  
  4011.  
  4012.  
  4013. if($("#user-details").length){
  4014. //urctoConsole("Found user-details window");
  4015. URComments.init();
  4016. } else {
  4017. //console.log("not def");
  4018. //urctoConsole("Could not find user-details window");
  4019. setTimeout(URComments.startcode, 2000);
  4020. }
  4021.  
  4022.  
  4023.  
  4024. /* var element = $("#user-details");
  4025. //urctoConsole("Found user-details window");
  4026. if (typeof element !== "undefined" && element.value !== '') {
  4027. //urctoConsole("Test2");
  4028. URComments.init();
  4029. //urctoConsole("Test3");
  4030. } else {
  4031. setTimeout(URComments.startcode, 2000);
  4032. }*/
  4033.  
  4034.  
  4035. /* catch (err) {
  4036. //urctoConsole(err);
  4037. if (err === "TypeError: element is null" || err === "TypeError: element is null") {
  4038. setTimeout(URComments.startcode, 2000);
  4039. }
  4040. setTimeout(URComments.startcode, 2000);
  4041. */
  4042. // }
  4043. };
  4044.  
  4045.  
  4046. /*
  4047. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4048. //// URO Preset Filters
  4049. ////
  4050. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4051.  
  4052. //URO+ these are the tags of all of the items URO uses to filter URs
  4053. URComments.UROCheckboxesArray = ["_cbFilterWazeAuto",
  4054. "_cbFilterIncorrectTurn", //
  4055. "_cbFilterIncorrectAddress", //
  4056. "_cbFilterIncorrectRoute", //
  4057. "_cbFilterMissingRoundabout", //
  4058. "_cbFilterGeneralError", //
  4059. "_cbFilterTurnNotAllowed", //
  4060. "_cbFilterIncorrectJunction", //
  4061. "_cbFilterMissingBridgeOverpass", //
  4062. "_cbFilterWrongDrivingDirection", //
  4063. "_cbFilterMissingExit", //
  4064. "_cbFilterMissingRoad", //
  4065. "_cbFilterBlockedRoad", //
  4066. "_cbFilterMissingLandmark", //
  4067. "_cbFilterUndefined", //
  4068. //"_cbFilterCryosphere", //
  4069. "_cbFilterRoadworks", //
  4070. "_cbFilterConstruction", //
  4071. "_cbFilterClosure", //
  4072. "_cbFilterEvent", //
  4073. "_cbFilterNote", //
  4074. "_cbInvertURFilter", //
  4075. "_cbFilterOpenUR", //
  4076. "_cbFilterClosedUR", //
  4077. "_cbFilterSolved", //
  4078. "_cbFilterUnidentified", //
  4079. "_cbEnableMinAgeFilter", //
  4080. "_cbEnableMaxAgeFilter", //
  4081. "_cbURDescriptionMustBePresent", //
  4082. "_cbURDescriptionMustBeAbsent", //
  4083. "_cbEnableKeywordMustBePresent", //
  4084. "_cbEnableKeywordMustBeAbsent", //
  4085. "_cbCaseInsensitive", //
  4086. "_cbHideMyComments", //
  4087. "_cbHideAnyComments", //
  4088. "_cbHideIfLastCommenter", //
  4089. "_cbHideIfNotLastCommenter", //
  4090. "_cbHideIfReporterLastCommenter", //
  4091. "_cbHideIfReporterNotLastCommenter", //
  4092. "_cbEnableMinCommentsFilter", //
  4093. "_cbEnableMaxCommentsFilter", //
  4094. "_cbHideMyFollowed", //
  4095. "_cbHideMyUnfollowed", //
  4096. "_cbEnableCommentAgeFilter2", //
  4097. "_cbEnableCommentAgeFilter", //
  4098. "_cbNoFilterForTaggedURs", //
  4099. "_cbURUserIDFilter", //Without comments from user
  4100. "_cbURResolverIDFilter" //Not resolved by user
  4101. ];
  4102.  
  4103. URComments.UROPresetHighlight = function(a) {
  4104. if (a === "URONewNoDescription") {
  4105. $('#URONewNoDescription').css('background-color', '#FFFF66');
  4106. $('#URCommentURONEW').css('background-color', '');
  4107. $('#URCommentURO4DayFollowUp').css('background-color', '');
  4108. $('#URCommentURO7Day').css('background-color', '');
  4109. $('#URCommentURO8Day').css('background-color', '');
  4110. $('#URCommentURO10Day').css('background-color', '');
  4111. $('#URCommentURO24Hr').css('background-color', '');
  4112. }
  4113.  
  4114. if (a === "UroShowNew") {
  4115. $('#URONewNoDescription').css('background-color', '');
  4116. $('#URCommentURONEW').css('background-color', '#FFFF66');
  4117. $('#URCommentURO4DayFollowUp').css('background-color', '');
  4118. $('#URCommentURO7Day').css('background-color', '');
  4119. $('#URCommentURO8Day').css('background-color', '');
  4120. $('#URCommentURO10Day').css('background-color', '');
  4121. $('#URCommentURO24Hr').css('background-color', '');
  4122. }
  4123. if (a === "URO4DayFollowUp") {
  4124. $('#URONewNoDescription').css('background-color', '');
  4125. $('#URCommentURONEW').css('background-color', '');
  4126. $('#URCommentURO4DayFollowUp').css('background-color', '#FFFF66');
  4127. $('#URCommentURO7Day').css('background-color', '');
  4128. $('#URCommentURO8Day').css('background-color', '');
  4129. $('#URCommentURO10Day').css('background-color', '');
  4130. $('#URCommentURO24Hr').css('background-color', '');
  4131. }
  4132. if (a === "URO7Day") {
  4133. $('#URONewNoDescription').css('background-color', '');
  4134. $('#URCommentURONEW').css('background-color', '');
  4135. $('#URCommentURO4DayFollowUp').css('background-color', '');
  4136. $('#URCommentURO7Day').css('background-color', '#FFFF66');
  4137. $('#URCommentURO8Day').css('background-color', '');
  4138. $('#URCommentURO10Day').css('background-color', '');
  4139. $('#URCommentURO24Hr').css('background-color', '');
  4140. }
  4141. if (a === "URO8Day") {
  4142. $('#URONewNoDescription').css('background-color', '');
  4143. $('#URCommentURONEW').css('background-color', '');
  4144. $('#URCommentURO4DayFollowUp').css('background-color', '');
  4145. $('#URCommentURO7Day').css('background-color', '');
  4146. $('#URCommentURO8Day').css('background-color', '#FFFF66');
  4147. $('#URCommentURO10Day').css('background-color', '');
  4148. $('#URCommentURO24Hr').css('background-color', '');
  4149. }
  4150. if (a === "URO10Day") {
  4151. $('#URONewNoDescription').css('background-color', '');
  4152. $('#URCommentURONEW').css('background-color', '');
  4153. $('#URCommentURO4DayFollowUp').css('background-color', '');
  4154. $('#URCommentURO7Day').css('background-color', '');
  4155. $('#URCommentURO8Day').css('background-color', '');
  4156. $('#URCommentURO10Day').css('background-color', '#FFFF66');
  4157. $('#URCommentURO24Hr').css('background-color', '');
  4158. }
  4159. if (a === "URO24Hr") {
  4160. $('#URONewNoDescription').css('background-color', '');
  4161. $('#URCommentURONEW').css('background-color', '');
  4162. $('#URCommentURO4DayFollowUp').css('background-color', '');
  4163. $('#URCommentURO7Day').css('background-color', '');
  4164. $('#URCommentURO8Day').css('background-color', '');
  4165. $('#URCommentURO10Day').css('background-color', '');
  4166. $('#URCommentURO24Hr').css('background-color', '#FFFF66');
  4167. }
  4168. if (a === "UROclearUROFiltrs") {
  4169. $('#URONewNoDescription').css('background-color', '');
  4170. $('#URCommentURONEW').css('background-color', '');
  4171. $('#URCommentURO4DayFollowUp').css('background-color', '');
  4172. $('#URCommentURO7Day').css('background-color', '');
  4173. $('#URCommentURO8Day').css('background-color', '');
  4174. $('#URCommentURO10Day').css('background-color', '');
  4175. $('#URCommentURO24Hr').css('background-color', '');
  4176. }
  4177.  
  4178. };
  4179.  
  4180. URComments.UROClearClicked = function(a) {
  4181. return function() {
  4182.  
  4183. URComments.UROPresetHighlight(a);
  4184.  
  4185. //save the current preset so we can reaply the highlighting on startup
  4186. localStorage.setItem('UROCurrentPeset', a);
  4187.  
  4188. if ($("#sidepanel-uroverview").length) {
  4189. //alert("test");
  4190. //urctoConsole("URO clear");
  4191. //this is the array used to store the URO id tags
  4192.  
  4193. //go over the array and clear all of the URO+ check boxes
  4194. for (var URComments_URO_Index = 0; URComments_URO_Index < URComments.UROCheckboxesArray.length; URComments_URO_Index = URComments_URO_Index + 1) {
  4195.  
  4196. if ($('#' + URComments.UROCheckboxesArray[URComments_URO_Index]).length <= 0) {
  4197. alert("there was an error finding URO's tag " + URComments.UROCheckboxesArray[URComments_URO_Index]);
  4198. return false;
  4199. }
  4200.  
  4201. if ($('#' + URComments.UROCheckboxesArray[URComments_URO_Index]).is(":checked")) {
  4202. //clicks the checkbox by if the checkbox is checked
  4203. $('#' + URComments.UROCheckboxesArray[URComments_URO_Index]).trigger('click');
  4204. } else {
  4205. //click check box if checkbox in unchecked
  4206. //$(document.getElementById(URComments.UROCheckboxesArray[ URComments_URO_Index ])).trigger('click');
  4207. }
  4208. }
  4209.  
  4210. // make it so uro+ doesnt filter tagged urs [NOTE]...
  4211. $('#_cbNoFilterForTaggedURs').trigger('click');
  4212. if (a === "UroShowNew") {
  4213. //urctoConsole("URO show new");
  4214. //If last comment made by UR reporter? chose no
  4215. $('#_cbHideIfReporterNotLastCommenter').trigger('click');
  4216. }
  4217. if (a === "URONewNoDescription") {
  4218. //only show no user description
  4219. $('#_cbURDescriptionMustBeAbsent').trigger('click');
  4220.  
  4221. //hide reporter did not leave the last comment
  4222. $('#_cbHideIfReporterNotLastCommenter').trigger('click');
  4223.  
  4224. //Hide With more than 1 comments
  4225. $('#_cbEnableMaxCommentsFilter').trigger('click');
  4226. $('#_inputFilterMaxComments').val(1);
  4227. }
  4228. if (a === "URO4DayFollowUp") {
  4229. //urctoConsole("URO 4 day");
  4230.  
  4231. //hide With less than 1 comments
  4232. $('#_inputFilterMinComments').val(1);
  4233. $('#_cbEnableMinCommentsFilter').trigger('click');
  4234.  
  4235. //Hide With more than 1 comments
  4236. $('#_inputFilterMaxComments').val(1);
  4237. $('#_cbEnableMaxCommentsFilter').trigger('click');
  4238.  
  4239. //Hide Last comment less than 4 days ago
  4240. $('#_inputFilterCommentDays2').val(4);
  4241. $('#_cbEnableCommentAgeFilter2').trigger('click');
  4242.  
  4243. }
  4244. if (a === "URO7Day") {
  4245. //urctoConsole("URO 7 day");
  4246.  
  4247. //hide With less than 1 comments
  4248. $('#_inputFilterMinComments').val(1); //1
  4249. $('#_cbEnableMinCommentsFilter').trigger('click');
  4250.  
  4251. //hide Last comment less than 7 days ago
  4252. $('#_inputFilterCommentDays2').val(7);//7
  4253. $('#_cbEnableCommentAgeFilter2').trigger('click');
  4254.  
  4255. //hide If last comment made by UR reporter?
  4256. $('#_cbHideIfReporterLastCommenter').trigger('click');
  4257. }
  4258. if (a === "URO8Day") {
  4259. //urctoConsole("URO 7 day");
  4260.  
  4261. //hide With less than 1 comments
  4262. $('#_inputFilterMinComments').val(1); //1
  4263. $('#_cbEnableMinCommentsFilter').trigger('click');
  4264.  
  4265. //hide Last comment less than 8 days ago
  4266. $('#_inputFilterCommentDays2').val(8);//8
  4267. $('#_cbEnableCommentAgeFilter2').trigger('click');
  4268.  
  4269. //hide If last comment made by UR reporter?
  4270. $('#_cbHideIfReporterLastCommenter').trigger('click');
  4271. }
  4272. if (a === "URO10Day") {
  4273. //urctoConsole("URO 10 day");
  4274.  
  4275. //hide With less than 1 comments
  4276. $('#_inputFilterMinComments').val(1); //1
  4277. $('#_cbEnableMinCommentsFilter').trigger('click');
  4278.  
  4279. //hide Last comment less than 8 days ago
  4280. $('#_inputFilterCommentDays2').val(10);//10
  4281. $('#_cbEnableCommentAgeFilter2').trigger('click');
  4282.  
  4283. //hide If last comment made by UR reporter?
  4284. $('#_cbHideIfReporterLastCommenter').trigger('click');
  4285. }
  4286. if (a === "URO24Hr") {
  4287.  
  4288. //alanoftheberg
  4289.  
  4290. //check "Hide URs less than days old" "8" days old
  4291. $('#_inputFilterMinDays').val(8);//8
  4292. $('#_cbEnableMinAgeFilter').trigger('click');
  4293.  
  4294.  
  4295. //check "yes" on "If last comment made by UR reporter?"
  4296. $('#_cbHideIfReporterLastCommenter').trigger('click');
  4297.  
  4298. //check "With less than" and put in "1" comments
  4299. $('#_inputFilterMinComments').val(1);//1
  4300. $('#_cbEnableMinCommentsFilter').trigger('click');
  4301.  
  4302. //check "Last comment more than" "1" days ago
  4303. $('#_inputFilterCommentDays').val(1);//1
  4304. $('#_cbEnableCommentAgeFilter').trigger('click');
  4305.  
  4306. }
  4307. if (a === "UROclearUROFiltrs") {}
  4308.  
  4309. //shared URO settings except clear
  4310. if (a !== "UROclearUROFiltrs") {
  4311. $('#_cbFilterUnidentified').trigger('click');
  4312. }
  4313.  
  4314. } else {
  4315. alert("UR Overview Plus (URO+) needs to be installed to use these URO Presets.");
  4316. }
  4317. };
  4318. };
  4319. */
  4320.  
  4321. URComments.startcode();
  4322. }
  4323. //URComments_bootstrap();
  4324. //setTimeout(URComments_bootstrap, 3000);
  4325.  
  4326. function urc_timeOut(urcTimeoutMessage) {
  4327. // We've waited a specific amount of time and have now reached a timeout without the function completing. So let's switch to CommentTeam, reload the panel and alert the user.
  4328. let urcConsoleError, urcAlertError;
  4329. if (urcTimeoutMessage === 1) {
  4330. urcConsoleError = "Timeout waiting for panel to load.";
  4331. urcAlertError = "URC timed out after waiting 10 seconds for the panel to load. Attempting to load the \"CommentTeam\" list instead.";
  4332. } else if (urcTimeoutMessage === 2) {
  4333. urcConsoleError = "Timeout waiting for " + SelectedBoilerPlateCreator + " comments to become available.";
  4334. urcAlertError = "URC timed out after waiting 30 seconds for " + SelectedBoilerPlateCreator + " comments to become available. The \"CommentTeam\" list has been selected instead.";
  4335. }
  4336. logError(urcConsoleError);
  4337. SelectedBoilerPlateCreator = "CommentTeam";
  4338. localStorage.setItem('BoilerPlateCreators', SelectedBoilerPlateCreator);
  4339. $("#sidepanel-Comments").html('');
  4340. ChangeLanguage = true;
  4341. urcListLoaded = true;
  4342. URComments_bootstrap();
  4343. alert(urcAlertError);
  4344. }
  4345.  
  4346. function bootstrap_init(tries) {
  4347. tries = tries || 1;
  4348. if (prevSelectedBoilerPlateCreator !== "") {
  4349. SelectedBoilerPlateCreator = prevSelectedBoilerPlateCreator;
  4350. prevSelectedBoilerPlateCreator = "";
  4351. localStorage.setItem('BoilerPlateCreators', SelectedBoilerPlateCreator);
  4352. }
  4353.  
  4354. if (window["Urcomments" + SelectedBoilerPlateCreator + "Array2"]) {
  4355. // We got the array finally. Let's reload the panel.
  4356. //clear the html from the tabs
  4357. $("#sidepanel-Comments").html('');
  4358. //reload the content
  4359. logDebug("Comments loaded after " + tries + " reties. Running bootstrap.");
  4360. ChangeLanguage = true;
  4361. urcListLoaded = true;
  4362. URComments_bootstrap();
  4363. } else if (tries < 30 && !window["Urcomments" + SelectedBoilerPlateCreator + "Array2"]) {
  4364. // If the custom comments array hasn't come available then let's try to wait for it to become available.
  4365. logDebug("Waiting on " + SelectedBoilerPlateCreator + " comments to become available. Retry " + tries + " of 30 maximum.");
  4366. //update the loading html
  4367. $("#URComments-comment1").html("Waiting for the " + SelectedBoilerPlateCreator + " comments to load. Retry " + tries + " of 30 maximum.")
  4368. setTimeout(function() { bootstrap_init(++tries); }, 1000);
  4369. } else {
  4370. // We've waited 30 seconds and the comments array has never been filled. So let's just cancel out now, leaving CommentTeam as the default.
  4371. urc_timeOut(2);
  4372. }
  4373. }
  4374.  
  4375. function urcPreBootstrapInit(tries) {
  4376. tries = tries || 1;
  4377.  
  4378. if (!location.href.match(/^https:\/\/(www|beta)\.waze\.com\/(?!user\/)(.{2,6}\/)?editor\/?.*$/)) {
  4379. // Not a WME page. Exit out silently.
  4380. return;
  4381. }
  4382.  
  4383. if (W && W.map && W.loginManager.user && $) {
  4384.  
  4385. // WME has loaded if the above 4 variables are set. So go ahead and move on.
  4386. if (SelectedBoilerPlateCreator !== "" && SelectedBoilerPlateCreator !== null && SelectedBoilerPlateCreator !== "CommentTeam" && !window["Urcomments" + SelectedBoilerPlateCreator + "Array2"]) {
  4387. //build the tab with the loading comments message
  4388. logDebug("Building the tab with the loading comments message");
  4389. prevSelectedBoilerPlateCreator = SelectedBoilerPlateCreator;
  4390. localStorage.setItem('BoilerPlateCreators', "LoadingSelected");
  4391. SelectedBoilerPlateCreator = "LoadingSelected";
  4392. URComments_bootstrap();
  4393.  
  4394. // Wait for URComments_bootstrap() to call URComments_init(), which will then set urcTabLoaded = true once it completes.
  4395. function urcCheckLoadStatus(tries2) {
  4396. tries2 = tries2 || 1;
  4397. if (urcTabLoaded) {
  4398. logDebug("URC tab initialized. Running bootstrap_init.");
  4399. bootstrap_init();
  4400. } else if (tries2 < 21) {
  4401. logDebug("Waiting for initial tab to finish initializing. Retry " + tries2 + " of 20 maximum.");
  4402. setTimeout(function() { urcCheckLoadStatus(++tries2); }, 500);
  4403. } else {
  4404. urc_timeOut(1);
  4405. }
  4406. }
  4407. urcCheckLoadStatus();
  4408. } else {
  4409. //run normal boot strap
  4410. if(window["Urcomments" + SelectedBoilerPlateCreator + "Array2"]) {
  4411. logDebug(SelectedBoilerPlateCreator + " custom comments have already loaded. Running bootstrap.");
  4412. } else {
  4413. logDebug("Default load. Running bootstrap.");
  4414. }
  4415. urcListLoaded = true;
  4416. URComments_bootstrap();
  4417. }
  4418.  
  4419. } else if (tries < 61) {
  4420. // Test again if W, W.map, W.loginmanager.user and $ have all been set
  4421. logDebug("Try " + tries + " for urcPreBootstrapInit");
  4422. setTimeout(function() { urcPreBootstrapInit(++tries); }, 500); // Test again if W, W.map, W.loginmanager.user and $ have all been set
  4423. } else {
  4424. logError("WME did not load within 30 seconds."); // WME didn't load within 30 seconds. So throw console.error and stop trying.
  4425. }
  4426. }
  4427. urcPreBootstrapInit();