From d7eb6b55d813ba75fc7c8255f3ced5e9f7acab1e Mon Sep 17 00:00:00 2001 From: silvereengames Date: Wed, 28 Aug 2024 07:46:43 -0400 Subject: [PATCH] added stats --- public/iframe.html | 47 +++++--- public/load.html | 241 ++++++++++++++++++++----------------- public/settings/index.html | 33 ++++- 3 files changed, 186 insertions(+), 135 deletions(-) diff --git a/public/iframe.html b/public/iframe.html index f32ba97..0219f90 100644 --- a/public/iframe.html +++ b/public/iframe.html @@ -3,11 +3,11 @@ - - - - + crossorigin="anonymous"> + + + + My Drive - Google Drive @@ -56,8 +56,8 @@
- + crossorigin="anonymous"> +
@@ -82,18 +82,29 @@ iframe.style.display = "block"; document.querySelector(".loading-screen").style.display = "none"; }; + + function countTime() { + localStorage.setItem('moonlight.timeplayed', parseInt(localStorage.getItem('moonlight.timeplayed')) + 1) + console.log(localStorage.getItem('timeplayed')) + } + + if (localStorage.getItem('moonlight.timeplayed')) { + setInterval(countTime, 1000) + } else { + localStorage.setItem('moonlight.timeplayed', 0); + setInterval(countTime, 1000) + } + + + +
+
+ - - -
-
- diff --git a/public/load.html b/public/load.html index d60d6de..ba67aee 100644 --- a/public/load.html +++ b/public/load.html @@ -1,125 +1,142 @@ - - - - - - - - - - -
- - - -

- Please wait while our servers handle your request.
- Our site may be experiencing heavy load affecting load times. -

-
- - + + +

+ Please wait while our servers handle your request.
+ Our site may be experiencing heavy load affecting load times. +

+
+ + - - + + - - - - - + }); + + function countTime() { + localStorage.setItem('moonlight.timesearched', parseInt(localStorage.getItem('moonlight.timesearched')) + 1) + console.log(localStorage.getItem('moonlight.timesearched')) + } + + if (localStorage.getItem('moonlight.timesearched')) { + setInterval(countTime, 1000) + } else { + localStorage.setItem('moonlight.timesearched', 0); + setInterval(countTime, 1000) + } + + + + + + + \ No newline at end of file diff --git a/public/settings/index.html b/public/settings/index.html index c6c9016..7a0a5e3 100644 --- a/public/settings/index.html +++ b/public/settings/index.html @@ -47,11 +47,14 @@

Tab cloak

More - +
- - + +
@@ -95,8 +98,9 @@

Proxy settings

-

Extension Disabler

-

Coming (very) soon...

+

Stats

+

Time Played:

+

Time using proxy:

@@ -387,6 +391,25 @@

Code Stuff

window.open('../iframe.html') } + const hours = document.getElementById('timeplayed'); + if (localStorage.getItem('moonlight.timeplayed') > 3600000) { + hours.innerHTML = Math.round(localStorage.getItem('moonlight.timeplayed') / 60 / 60) + " Hours" + } else if (localStorage.getItem('timeplayed') < 60000) { + hours.innerHTML = Math.round(localStorage.getItem('moonlight.timeplayed') / 60) + " Minutes" + } else { + hours.innerHTML = Math.round(localStorage.getItem('moonlight.timeplayed')) + " Seconds" + } + + const timesearched = document.getElementById('timesearched'); + if (localStorage.getItem('moonlight.timesearched') > 3600000) { + timesearched.innerHTML = Math.round(localStorage.getItem('moonlight.timesearched') / 60 / 60) + " Hours" + } else if (localStorage.getItem('timesearched') < 60000) { + timesearched.innerHTML = Math.round(localStorage.getItem('moonlight.timesearched') / 60) + " Minutes" + } else { + timesearched.innerHTML = Math.round(localStorage.getItem('moonlight.timesearched')) + " Seconds" + } + + let obj = new Date(); let day = obj.getUTCDate(); let month = obj.getUTCMonth() + 1;