mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 09:09:30 -07:00
auto update dependencies available on npm
This commit is contained in:
@@ -379,9 +379,9 @@ const index = (() => {
|
||||
}
|
||||
|
||||
if (navigation.isPlaying()) {
|
||||
_NoSleep.enable();
|
||||
noSleepEnable();
|
||||
} else {
|
||||
_NoSleep.disable();
|
||||
noSleepDisable();
|
||||
}
|
||||
|
||||
UpdateFullScreenNavigate();
|
||||
@@ -683,13 +683,13 @@ const index = (() => {
|
||||
localStorage.setItem('TwcPlay', navigation.isPlaying());
|
||||
|
||||
if (navigation.isPlaying()) {
|
||||
_NoSleep.enable();
|
||||
noSleepEnable();
|
||||
$('img[src=\'images/nav/ic_play_arrow_white_24dp_1x.png\']').attr('title', 'Pause');
|
||||
$('img[src=\'images/nav/ic_play_arrow_white_24dp_1x.png\']').attr('src', 'images/nav/ic_pause_white_24dp_1x.png');
|
||||
$('img[src=\'images/nav/ic_play_arrow_white_24dp_2x.png\']').attr('title', 'Pause');
|
||||
$('img[src=\'images/nav/ic_play_arrow_white_24dp_2x.png\']').attr('src', 'images/nav/ic_pause_white_24dp_2x.png');
|
||||
} else {
|
||||
_NoSleep.disable();
|
||||
noSleepDisable();
|
||||
|
||||
$('img[src=\'images/nav/ic_pause_white_24dp_1x.png\']').attr('title', 'Play');
|
||||
$('img[src=\'images/nav/ic_pause_white_24dp_1x.png\']').attr('src', 'images/nav/ic_play_arrow_white_24dp_1x.png');
|
||||
@@ -812,6 +812,18 @@ const index = (() => {
|
||||
postMessage('assignScrollText', ScrollText);
|
||||
};
|
||||
|
||||
// track state of nosleep locally to avoid a null case error when nosleep.disable is called without first calling .enable
|
||||
let wakeLock = false;
|
||||
const noSleepEnable = () => {
|
||||
_NoSleep.enable();
|
||||
wakeLock = true;
|
||||
};
|
||||
const noSleepDisable = () => {
|
||||
if (!wakeLock) return;
|
||||
_NoSleep.disable();
|
||||
wakeLock = false;
|
||||
};
|
||||
|
||||
return {
|
||||
init,
|
||||
message,
|
||||
|
||||
2
server/scripts/vendor/addtohomescreen.min.js
vendored
2
server/scripts/vendor/addtohomescreen.min.js
vendored
File diff suppressed because one or more lines are too long
10872
server/scripts/vendor/auto/jquery.js
vendored
Normal file
10872
server/scripts/vendor/auto/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
8296
server/scripts/vendor/auto/luxon.js
vendored
Normal file
8296
server/scripts/vendor/auto/luxon.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
240
server/scripts/vendor/auto/nosleep.js
vendored
Normal file
240
server/scripts/vendor/auto/nosleep.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -125,7 +125,6 @@ function approxTransit(Ht, lw, n) { return J0 + (Ht + lw) / (2 * PI) + n; }
|
||||
function solarTransitJ(ds, M, L) { return J2000 + ds + 0.0053 * sin(M) - 0.0069 * sin(2 * L); }
|
||||
|
||||
function hourAngle(h, phi, d) { return acos((sin(h) - sin(phi) * sin(d)) / (cos(phi) * cos(d))); }
|
||||
function observerAngle(height) { return -2.076 * Math.sqrt(height) / 60; }
|
||||
|
||||
// returns set time for the given sun altitude
|
||||
function getSetJ(h, lw, phi, dec, n, M, L) {
|
||||
@@ -136,18 +135,13 @@ function getSetJ(h, lw, phi, dec, n, M, L) {
|
||||
}
|
||||
|
||||
|
||||
// calculates sun times for a given date, latitude/longitude, and, optionally,
|
||||
// the observer height (in meters) relative to the horizon
|
||||
// calculates sun times for a given date and latitude/longitude
|
||||
|
||||
SunCalc.getTimes = function (date, lat, lng, height) {
|
||||
|
||||
height = height || 0;
|
||||
SunCalc.getTimes = function (date, lat, lng) {
|
||||
|
||||
var lw = rad * -lng,
|
||||
phi = rad * lat,
|
||||
|
||||
dh = observerAngle(height),
|
||||
|
||||
d = toDays(date),
|
||||
n = julianCycle(d, lw),
|
||||
ds = approxTransit(0, lw, n),
|
||||
@@ -158,7 +152,7 @@ SunCalc.getTimes = function (date, lat, lng, height) {
|
||||
|
||||
Jnoon = solarTransitJ(ds, M, L),
|
||||
|
||||
i, len, time, h0, Jset, Jrise;
|
||||
i, len, time, Jset, Jrise;
|
||||
|
||||
|
||||
var result = {
|
||||
@@ -168,9 +162,8 @@ SunCalc.getTimes = function (date, lat, lng, height) {
|
||||
|
||||
for (i = 0, len = times.length; i < len; i += 1) {
|
||||
time = times[i];
|
||||
h0 = (time[0] + dh) * rad;
|
||||
|
||||
Jset = getSetJ(h0, lw, phi, dec, n, M, L);
|
||||
Jset = getSetJ(time[0] * rad, lw, phi, dec, n, M, L);
|
||||
Jrise = Jnoon - (Jset - Jnoon);
|
||||
|
||||
result[time[1]] = fromJulian(Jrise);
|
||||
@@ -314,4 +307,4 @@ if (typeof exports === 'object' && typeof module !== 'undefined') module.exports
|
||||
else if (typeof define === 'function' && define.amd) define(SunCalc);
|
||||
else window.SunCalc = SunCalc;
|
||||
|
||||
}());
|
||||
}());
|
||||
2
server/scripts/vendor/jquery-3.5.1.min.js
vendored
2
server/scripts/vendor/jquery-3.5.1.min.js
vendored
File diff suppressed because one or more lines are too long
1
server/scripts/vendor/luxon.js
vendored
1
server/scripts/vendor/luxon.js
vendored
File diff suppressed because one or more lines are too long
2
server/scripts/vendor/nosleep.min.js
vendored
2
server/scripts/vendor/nosleep.min.js
vendored
@@ -1,2 +0,0 @@
|
||||
// NoSleep.min.js v0.5.0 - git.io/vfn01 - Rich Tibbett - MIT license
|
||||
!function(A){function e(A,e,o){var t=document.createElement("source");t.src=o,t.type="video/"+e,A.appendChild(t)}var o={Android:/Android/gi.test(navigator.userAgent),iOS:/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)},t={WebM:"data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBAB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IWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAK2lsc3QAAAAjqXRvbwAAABtkYXRhAAAAAQAAAABMYXZmNTIuNzguMw=="},i=function(){return o.iOS?this.noSleepTimer=null:o.Android&&(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("loop",""),e(this.noSleepVideo,"webm",t.WebM),e(this.noSleepVideo,"mp4",t.MP4)),this};i.prototype.enable=function(A){o.iOS?(this.disable(),this.noSleepTimer=window.setInterval(function(){window.location.href='/',window.setTimeout(window.stop,0)},A||15e3)):o.Android&&this.noSleepVideo.play()},i.prototype.disable=function(){o.iOS?this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):o.Android&&this.noSleepVideo.pause()},A.NoSleep=i}(this);
|
||||
Reference in New Issue
Block a user