Skip to content

Commit

Permalink
added stats
Browse files Browse the repository at this point in the history
  • Loading branch information
silvereengames committed Aug 28, 2024
1 parent dfc440d commit d7eb6b5
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 135 deletions.
47 changes: 29 additions & 18 deletions public/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

<head>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7001820938357122"
crossorigin="anonymous"></script>
<meta name="google-adsense-account" content="ca-pub-7001820938357122">
<link rel="stylesheet" type="text/css" href="assets/css/iframe.css">
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="icon" id="icon" href="">
crossorigin="anonymous"></script>
<meta name="google-adsense-account" content="ca-pub-7001820938357122">
<link rel="stylesheet" type="text/css" href="assets/css/iframe.css">
<link rel="stylesheet" type="text/css" href="index.css">
<link rel="icon" id="icon" href="">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<title>My Drive - Google Drive</title>
Expand Down Expand Up @@ -56,8 +56,8 @@
</div>
<div class="iframe-container">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7001820938357122"
crossorigin="anonymous"></script>
<!-- ML In Game -->
crossorigin="anonymous"></script>
<!-- ML In Game -->

<iframe id="iframe" src="" frameborder="0" allowfullscreen></iframe>
<div class="buttons-bar">
Expand All @@ -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)
}
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7001820938357122"
crossorigin="anonymous"></script>
<!-- In games ad 1 -->
<div style="width: 1px; height: 5vh"></div>
<center><ins class="adsbygoogle"
style="display:block;width:728px;height:90px;text-align: center;position: relative; z-index: -99;"
data-ad-client="ca-pub-7001820938357122" data-ad-slot="3507599545"></ins></center>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7001820938357122"
crossorigin="anonymous"></script>
<!-- In games ad 1 -->
<div style="width: 1px; height: 5vh"></div>
<center><ins class="adsbygoogle"
style="display:block;width:728px;height:90px;text-align: center;position: relative; z-index: -99;"
data-ad-client="ca-pub-7001820938357122"
data-ad-slot="3507599545"></ins></center>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</body>

Expand Down
241 changes: 129 additions & 112 deletions public/load.html
Original file line number Diff line number Diff line change
@@ -1,125 +1,142 @@
<!DOCTYPE html>
<html>
<head>

<title></title>
<script src="assets/js/themes.js"></script>
<link rel="icon" id="icon" href="">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7001820938357122"
crossorigin="anonymous"></script>
<meta name="google-adsense-account" content="ca-pub-7001820938357122">
<style>
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans&family=Roboto&display=swap");

body {
background: #000;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
}

iframe {
width: 100%;
height: 100%;
border: none;
position: fixed;
top: 0;
display: flex;
}
<head>

.loading-screen {
display: flex;
justify-content: center;
width: 100%;
margin-top: -2%;
height: 100%;
align-items: center;
flex-direction: column;
}
<title></title>
<script src="assets/js/themes.js"></script>
<link rel="icon" id="icon" href="">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7001820938357122"
crossorigin="anonymous"></script>
<meta name="google-adsense-account" content="ca-pub-7001820938357122">
<style>
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans&family=Roboto&display=swap");

p {
font-family: Roboto;
}
body {
background: #000;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
}

.info {
color: rgb(95, 95, 255);
max-width: 600px;
text-align: center;
margin: 35px 0 0;
}
iframe {
width: 100%;
height: 100%;
border: none;
position: fixed;
top: 0;
display: flex;
}

.ring {
display: inline-block;
width: 160px;
height: 160px;
}
.loading-screen {
display: flex;
justify-content: center;
width: 100%;
margin-top: -2%;
height: 100%;
align-items: center;
flex-direction: column;
}

.ring:after {
content: " ";
display: block;
width: 128px;
height: 128px;
margin: 16px;
border-radius: 50%;
border: 12px solid rgb(95, 95, 255);
border-color: rgb(95, 95, 255) transparent rgb(95, 95, 255) transparent;
animation: ring 1s linear infinite;
}
p {
font-family: Roboto;
}

@keyframes ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
.info {
color: rgb(95, 95, 255);
max-width: 600px;
text-align: center;
margin: 35px 0 0;
}

.ring {
display: inline-block;
width: 160px;
height: 160px;
}

.ring:after {
content: " ";
display: block;
width: 128px;
height: 128px;
margin: 16px;
border-radius: 50%;
border: 12px solid rgb(95, 95, 255);
border-color: rgb(95, 95, 255) transparent rgb(95, 95, 255) transparent;
animation: ring 1s linear infinite;
}

@keyframes ring {
0% {
transform: rotate(0deg);
}
</style>
</head>
<body>
<div class="loading-screen">
<script src="https://unpkg.com/@dotlottie/player-component@latest/dist/dotlottie-player.mjs" type="module"></script>

<dotlottie-player src="https://lottie.host/15007873-64f3-4f04-aae7-d2f4e59f8575/SVb9rmfpsV.json" background="transparent" speed="1" style="width: 300px; height: 300px;" loop autoplay></dotlottie-player>
<p class="info">
Please wait while our servers handle your request. <br />
Our site may be experiencing heavy load affecting load times.
</p>
</div>
<iframe id="proxy-screen" src="" style="z-index: 9999;"></iframe>
<script>
if (localStorage.getItem("proxy-load") == null && localStorage.getItem("proxy-load") == "") {
window.location.replace("/");

100% {
transform: rotate(360deg);
}
}
</style>
</head>

<body>
<div class="loading-screen">
<script src="https://unpkg.com/@dotlottie/player-component@latest/dist/dotlottie-player.mjs" type="module"></script>

<dotlottie-player src="https://lottie.host/15007873-64f3-4f04-aae7-d2f4e59f8575/SVb9rmfpsV.json"
background="transparent" speed="1" style="width: 300px; height: 300px;" loop autoplay></dotlottie-player>
<p class="info">
Please wait while our servers handle your request. <br />
Our site may be experiencing heavy load affecting load times.
</p>
</div>
<iframe id="proxy-screen" src="" style="z-index: 9999;"></iframe>
<script>
if (localStorage.getItem("proxy-load") == null && localStorage.getItem("proxy-load") == "") {
window.location.replace("/");
}

var iframe = document.getElementById("proxy-screen");
iframe.src = localStorage.getItem("proxy-load");

iframe.onload = function () {
iframe.style.display = "block";
document.querySelector(".loading-screen").style.display = "none";
document.body.style.background="white";
};
</script>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script>
var panickey = localStorage.getItem("panicKey");
console.log(panickey);
var panicwebsite = localStorage.getItem("panicWebsite");
$(function () {
$(document).keydown(function (e) {
console.log(e.key);
if (e.key == panickey) {
window.open(panicwebsite, "_self");
}
});
var iframe = document.getElementById("proxy-screen");
iframe.src = localStorage.getItem("proxy-load");

iframe.onload = function () {
iframe.style.display = "block";
document.querySelector(".loading-screen").style.display = "none";
document.body.style.background = "white";
};
</script>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script>
var panickey = localStorage.getItem("panicKey");
console.log(panickey);
var panicwebsite = localStorage.getItem("panicWebsite");
$(function () {
$(document).keydown(function (e) {
console.log(e.key);
if (e.key == panickey) {
window.open(panicwebsite, "_self");
}
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/eruda/3.0.1/eruda.min.js"></script>
<script src="/assets/js/cloak.js"></script>
<script>eruda.init();</script>
</body>
</html>
});

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)
}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/eruda/3.0.1/eruda.min.js"></script>
<script src="/assets/js/cloak.js"></script>
<script>eruda.init();</script>
</body>

</html>
33 changes: 28 additions & 5 deletions public/settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ <h2 class="center">Tab cloak</h2>
<details style="text-align: center;">
<summary>More</summary>
<button onclick="setTitle('Inbox (27)');setIcon('/assets/imgs/favicons/gmail.ico')">Gmail</button>
<button onclick="setTitle(`Calender ${month}/${day}/${year}`);setIcon('/assets/imgs/favicons/google-calender.ico')">Calender</button>
<button
onclick="setTitle(`Calender ${month}/${day}/${year}`);setIcon('/assets/imgs/favicons/google-calender.ico')">Calender</button>
<button onclick="setTitle('Canvas');setIcon('/assets/imgs/favicons/canvas.ico')">Canvas</button>
<br>
<button onclick="setTitle('My Drive - Google Drive');setIcon('/assets/imgs/favicons/google-drive.ico')">Google Drive</button>
<button onclick="setTitle('Khan Academy');setIcon('/assets/imgs/favicons/khan-academy.ico')">Khan Academy</button>
<button onclick="setTitle('My Drive - Google Drive');setIcon('/assets/imgs/favicons/google-drive.ico')">Google
Drive</button>
<button onclick="setTitle('Khan Academy');setIcon('/assets/imgs/favicons/khan-academy.ico')">Khan
Academy</button>
<button onclick="setTitle('New Tab');setIcon('/assets/imgs/favicons/newtab.png')">New Tab</button>
</details>
</div>
Expand Down Expand Up @@ -95,8 +98,9 @@ <h2 class="center">Proxy settings</h2>
</div>

<div class="settings-container">
<h2 class="center">Extension Disabler</h2>
<p class="center">Coming <sub>(very)</sub> soon...</p>
<h2 class="center">Stats</h2>
<h4 class="center">Time Played: <span id="timeplayed"></span></h4>
<h4 class="center">Time using proxy: <span id="timesearched"></span></h4>
</div>

<div class="settings-container">
Expand Down Expand Up @@ -387,6 +391,25 @@ <h3 class="sticky">Code Stuff</h3>
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;
Expand Down

0 comments on commit d7eb6b5

Please sign in to comment.