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

目前为 2018-05-09 提交的版本。查看 最新版本

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