Spaces:
Sleeping
Sleeping
Update static/DropboxWorker.js
Browse files- static/DropboxWorker.js +19 -6
static/DropboxWorker.js
CHANGED
|
@@ -26,13 +26,26 @@ function ajax(url) {
|
|
| 26 |
});
|
| 27 |
}
|
| 28 |
|
| 29 |
-
this.now
|
| 30 |
-
|
| 31 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
var millisTill10 = new Date(this.now.getFullYear(), this.now.getMonth(), this.now.getDate(), 12, 26, 0, 0) - this.now;
|
| 34 |
-
console.log(this.now)
|
| 35 |
if (millisTill10 < 0) {
|
| 36 |
-
|
| 37 |
}
|
| 38 |
setTimeout(function(){intervalBegin()}, millisTill10);
|
|
|
|
| 26 |
});
|
| 27 |
}
|
| 28 |
|
| 29 |
+
// console.log(new Date(this.now.getFullYear(), this.now.getMonth(), this.now.getDate(), 9, 0, 0, 0) )
|
| 30 |
+
|
| 31 |
+
// this.now = new Date();
|
| 32 |
+
// this.hours = this.now.getHours();
|
| 33 |
+
// this.minutes = this.now.getMinutes();
|
| 34 |
+
|
| 35 |
+
// var millisTill10 = new Date(this.now.getFullYear(), this.now.getMonth(), this.now.getDate(), 9, 0, 0, 0) - this.now;
|
| 36 |
+
// console.log(this.now)
|
| 37 |
+
// if (millisTill10 < 0) {
|
| 38 |
+
// millisTill10 += 43200000; // try every 12 hours
|
| 39 |
+
// }
|
| 40 |
+
// setTimeout(function(){intervalBegin()}, millisTill10);
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
datenow= new Date();
|
| 44 |
+
var utc_timestamp =Date.UTC(datenow.getUTCFullYear(),datenow.getUTCMonth(), datenow.getUTCDate() , datenow.getUTCHours(), datenow.getUTCMinutes());
|
| 45 |
+
var utc_timestamp1 =Date.UTC(datenow.getUTCFullYear(),datenow.getUTCMonth(), datenow.getUTCDate() , 11, 0,0,0); //eet to utc - our time -2
|
| 46 |
+
millisTill10= utc_timestamp-utc_timestamp1
|
| 47 |
|
|
|
|
|
|
|
| 48 |
if (millisTill10 < 0) {
|
| 49 |
+
millisTill10 += 43200000; // try every 12 hours
|
| 50 |
}
|
| 51 |
setTimeout(function(){intervalBegin()}, millisTill10);
|