Skip to content

Commit

Permalink
Added a message saying the now.gg fix has been applied (#552 & #564)
Browse files Browse the repository at this point in the history
  • Loading branch information
xbubbo committed Mar 23, 2024
1 parent 6e2858a commit ae33ad6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 6 deletions.
8 changes: 5 additions & 3 deletions static/assets/scripts/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,18 @@ function now() {
const iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
const element = iframeDocument.querySelector('.sc-hGPBjI.gGkQpt');
if (element) {
console.log("Unsafe proxy or VPN detected. Reloading...");
iframe.contentWindow.location.reload();
document.querySelector('.overlay').style.display = 'block';
document.getElementById('ifra').style.display = 'none';
iframeDocument.location.reload();
count += 1;
notfound = 0;
} else {
console.log("Class not found inside the iframe.");
notfound += 1;
if (notfound >= max) {
console.log(`Class not found for ${max} consecutive checks. Stopping.`);
clearInterval(reloadInterval);
document.getElementById('ifra').style.display = 'block';
document.querySelector('.overlay').style.display = 'none';
}
}
} else {
Expand Down
32 changes: 32 additions & 0 deletions static/assets/styles/frame.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

body {
font-family: 'Inter', sans-serif;
text-decoration: none;
margin: 0;
overflow-x: hidden;
overflow-y: hidden;
background: var(--main)
}

iframe {
Expand Down Expand Up @@ -142,3 +148,29 @@ iframe {
height: 30px;
border-radius: 5px;
}

.overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: none;
}

h1 {
text-align: center;
color: white;
font-size: 50px;
white-space: nowrap;
}

p {
text-align: center;
color: white;
font-size: 25px;
}

a {
color: #6495ED
}

10 changes: 7 additions & 3 deletions static/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta http-equiv="X-Content-Type-Options" content="nosniff" />
<link rel="shortcut icon" id="tab-favicon" href="favicon.png" />
<title id="tab-title">Home</title>
<link rel="stylesheet" href="assets/styles/frame.css?v=4" />
<link rel="stylesheet" href="assets/styles/frame.css?v=5" />
<link rel="stylesheet" href="/assets/styles/themes/default.css?v=5" />
</head>
<body>
Expand Down Expand Up @@ -42,7 +42,11 @@
</div>
</div>
</div>
<iframe
<div class="overlay">
<h1>Now.gg fix is being applied, please wait.</h1>
<p>It should only take 1-2 minutes, if it takes longer <a href="https://support.google.com/accounts/answer/32050">clear your cache</a> or join our <a href="https://discord.gg/interstellar">discord!</a></p>
</div>
<iframe
src=""
id="ifra"
onload="iframeLoad()"
Expand All @@ -57,7 +61,7 @@
width="100%"
allowfullscreen></iframe>
<script src="assets/scripts/index.js?v=9"></script>
<script src="assets/scripts/frame.js?v=24"></script>
<script src="assets/scripts/frame.js?v=26"></script>
<script src="/assets/scripts/main.js?v=12"></script>
<script src="./m/bundle.js?v=5"></script>
<script src="./m/config.js?v=5"></script>
Expand Down

0 comments on commit ae33ad6

Please sign in to comment.