Skip to content

Commit 8b9f8e1

Browse files
committed
Merge branch 'testing'
2 parents 2a14ab7 + 9bab3ca commit 8b9f8e1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

WME Form Filler.user.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @name WME Form Filler
33
// @description Use info from WME to automatically fill out related forms
44
// @namespace https://greasyfork.org/users/6605
5-
// @version 1.2
5+
// @version 1.3
66
// @match https://www.waze.com/*editor/*
77
// @match https://beta.waze.com/*editor/*
88
// @exclude https://www.waze.com/*user/editor/*
@@ -572,8 +572,11 @@ function ff_addFormBtn()
572572

573573
function ff_loadSettings()
574574
{
575-
var todayDate = new Date();
575+
var todayDate = new Date(),
576+
futureDate = new Date(),
577+
daysInFuture = 3;
576578
var today = todayDate.getFullYear() +"-"+ (todayDate.getMonth()+1<10 ? "0"+(todayDate.getMonth()+1) : todayDate.getMonth()+1) +"-"+ todayDate.getDate();
579+
futureDate.setDate(futureDate.getDate() + daysInFuture);
577580

578581
var ffOpenInTab = localStorage.getItem("ff-open-in-tab");
579582
if (ffOpenInTab === "1")
@@ -586,8 +589,8 @@ function ff_loadSettings()
586589
$("#ff-closure-endDate").val(ffClosureEndDate);
587590
else
588591
{
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);
591594
}
592595
var ffClosureEndTime = localStorage.getItem("ff-closure-endTime");
593596
if (ffClosureEndTime !== null && ffClosureEndTime !== "")

0 commit comments

Comments
 (0)