File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 2
2
// @name WME Form Filler
3
3
// @description Use info from WME to automatically fill out related forms
4
4
// @namespace https://greasyfork.org/users/6605
5
- // @version 1.2
5
+ // @version 1.3
6
6
// @match https://www.waze.com/*editor/*
7
7
// @match https://beta.waze.com/*editor/*
8
8
// @exclude https://www.waze.com/*user/editor/*
@@ -572,8 +572,11 @@ function ff_addFormBtn()
572
572
573
573
function ff_loadSettings ( )
574
574
{
575
- var todayDate = new Date ( ) ;
575
+ var todayDate = new Date ( ) ,
576
+ futureDate = new Date ( ) ,
577
+ daysInFuture = 3 ;
576
578
var today = todayDate . getFullYear ( ) + "-" + ( todayDate . getMonth ( ) + 1 < 10 ? "0" + ( todayDate . getMonth ( ) + 1 ) : todayDate . getMonth ( ) + 1 ) + "-" + todayDate . getDate ( ) ;
579
+ futureDate . setDate ( futureDate . getDate ( ) + daysInFuture ) ;
577
580
578
581
var ffOpenInTab = localStorage . getItem ( "ff-open-in-tab" ) ;
579
582
if ( ffOpenInTab === "1" )
@@ -586,8 +589,8 @@ function ff_loadSettings()
586
589
$ ( "#ff-closure-endDate" ) . val ( ffClosureEndDate ) ;
587
590
else
588
591
{
589
- today = todayDate . getFullYear ( ) + "-" + ( todayDate . getMonth ( ) + 1 < 10 ? "0" + ( todayDate . getMonth ( ) + 1 ) : todayDate . getMonth ( ) + 1 ) + "-" + ( todayDate . getDate ( ) + 3 ) ;
590
- $ ( "#ff-closure-endDate" ) . val ( today . toString ( "yyyy-MM-dd" ) ) ;
592
+ var closureDate = futureDate . getFullYear ( ) + "-" + ( futureDate . getMonth ( ) + 1 < 10 ? "0" + ( futureDate . getMonth ( ) + 1 ) : futureDate . getMonth ( ) + 1 ) + "-" + ( futureDate . getDate ( ) < 10 ? "0" + futureDate . getDate ( ) : futureDate . getDate ( ) ) ;
593
+ $ ( "#ff-closure-endDate" ) . val ( closureDate ) ;
591
594
}
592
595
var ffClosureEndTime = localStorage . getItem ( "ff-closure-endTime" ) ;
593
596
if ( ffClosureEndTime !== null && ffClosureEndTime !== "" )
You can’t perform that action at this time.
0 commit comments