Skip to content

Commit

Permalink
Fix Now.GG Alignment issue
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 21, 2024
1 parent d7b3c3c commit eac047b
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 81 deletions.
175 changes: 94 additions & 81 deletions static/agloader.html
Original file line number Diff line number Diff line change
@@ -1,81 +1,94 @@
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="title" content="CCM Mathematics" />
<meta name="description"
content="Enhancing mathematical skills with comprehensive courses and resources for problem-solving and analytical thinking." />
<link rel="icon" href="/assets/img/doge.jpg">
<script src="https://cdnjs.cloudflare.com/ajax/libs/script.js/2.0.2/script.min.js" integrity="sha512-UWtTDM6wtl/qutDD6i1JOGZGiEd92dveVzuLl8sMBkMHlOHcbZdexM7ZrKkeaugW7vhqDnWc2pPD/ohEV+BBbg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="/assets/js/rightclick.js"></script>
<script src="/assets/js/cloak.js"></script>
<script src="/assets/js/functions.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6YEQ7Q0XRC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-6YEQ7Q0XRC');
</script>
<title>Doge | V4</title>
<script>
window.onload = function () {
let encodedAg = sessionStorage.getItem("agUrl");
encodedAg = "/service/" + encodedAg;
document.querySelector("#siteurl").src = encodedAg;

// URL
function getRandomThreeDigitNumber() {
return Math.floor(Math.random() * 900) + 100;
}

function getRandomAlphanumericString(length) {
const characters = 'abcdefghijklmnopqrstuvw0123456789012345';
let result = '';
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * characters.length));
}
return result;
}

var randomThreeDigitNumber = getRandomThreeDigitNumber();
var randomAlphanumericString = getRandomAlphanumericString(15);

var url = '/lessons?pg=' + randomThreeDigitNumber + '#' + randomAlphanumericString;
var title = 'Google Docs';

history.pushState({}, title, url);
};
</script>
<script>
var loginValue = localStorage.getItem('login');

if (loginValue === 'enablelogin') {
var isLoggedIn = localStorage.getItem('pass');

if (isLoggedIn === 'correct') {
console.log("User has successfully logged in.");
} else {
console.log('User has attempted to bypass login screen. Redirecting.');
location.href = '/';
}
} else {
console.log("Login is not enabled.");
}
</script>
</head>
<body>
<script src="/assets/js/index.js"></script>
<script src="/uv/uv.bundle.js"></script>
<script src="/uv/uv.bundle.js"></script>
<script src="/uv/uv.config.js"></script>
<script src="/assets/js/ag.js"></script>
<script>
window.navigator.serviceWorker
.register("/sw.js", {
scope: __uv$config.prefix,
})
</script>
<iframe src="loading.html" id="siteurl" style="position: fixed; inset: 0px; outline: none; border: none; height: 100%; width: 100%; overflow: hidden;"></iframe>
</body>

<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="title" content="CCM Mathematics" />
<meta name="description"
content="Enhancing mathematical skills with comprehensive courses and resources for problem-solving and analytical thinking." />
<link rel="icon" href="/assets/img/doge.jpg">
<script src="https://cdnjs.cloudflare.com/ajax/libs/script.js/2.0.2/script.min.js" integrity="sha512-UWtTDM6wtl/qutDD6i1JOGZGiEd92dveVzuLl8sMBkMHlOHcbZdexM7ZrKkeaugW7vhqDnWc2pPD/ohEV+BBbg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="/assets/js/rightclick.js"></script>
<script src="/assets/js/cloak.js"></script>
<script src="/assets/js/functions.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6YEQ7Q0XRC"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-6YEQ7Q0XRC');
</script>
<title>Doge | V4</title>
<script>
window.onload = function() {
let encodedAg = sessionStorage.getItem("agUrl");
encodedAg = "/service/" + encodedAg;
document.querySelector("#siteurl").src = encodedAg;

var scriptElement = document.createElement('script');

scriptElement.src = '/assets/js/now.js';
scriptElement.onload = function() {
console.log('Sucessfully loaded Now.GG injection script.');
};
scriptElement.onerror = function() {
console.error('Now.GG injection could not be loaded.');
};

document.head.appendChild(scriptElement);



// URL CLOAKING
function getRandomThreeDigitNumber() {
return Math.floor(Math.random() * 900) + 100;
}

function getRandomAlphanumericString(length) {
const characters = 'abcdefghijklmnopqrstuvw0123456789012345';
let result = '';
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * characters.length));
}
return result;
}

var randomThreeDigitNumber = getRandomThreeDigitNumber();
var randomAlphanumericString = getRandomAlphanumericString(15);

var url = '/lessons?pg=' + randomThreeDigitNumber + '#' + randomAlphanumericString;
var title = 'Google Docs';

history.pushState({}, title, url);
};
</script>
<script>
var loginValue = localStorage.getItem('login');
if (loginValue === 'enablelogin') {
var isLoggedIn = localStorage.getItem('pass');

if (isLoggedIn === 'correct') {
console.log("User has successfully logged in.");
} else {
console.log('User has attempted to bypass login screen. Redirecting.');
location.href = '/';
}
} else {
console.log("Login is not enabled.");
}
</script>
</head>
<body>
<script src="/assets/js/index.js"></script>
<script src="/uv/uv.bundle.js"></script>
<script src="/uv/uv.bundle.js"></script>
<script src="/uv/uv.config.js"></script>
<script src="/assets/js/ag.js"></script>
<script>
window.navigator.serviceWorker
.register("/sw.js", {
scope: __uv$config.prefix,
})
</script>
<iframe src="loading.html" id="siteurl" style="position: fixed; inset: 0px; outline: none; border: none; height: 100%; width: 100%; overflow: hidden;"></iframe>
</body>

33 changes: 33 additions & 0 deletions static/assets/js/now.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Made by @xderpman
If you reuse this code, provide proper credits or keep this comment.
*/

var agFrame = document.querySelector('#siteurl').src;
var ngUrl = 'https://' + window.location.hostname + '/service/hvtrs8%2F-nmw%2Cge%2Fkfpaoe-slirpgt%3Darp%5Dpig%3Fcmm%2Crmbnoz.alkelt%24pcrvngr%3Fgcmgnmrc';

if (agFrame === ngUrl) {
function fixNowGGScript() {
var iframe = top.document.getElementById('siteurl');
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
var roblox = innerDoc.getElementById('js-game-video');
var controlBar = innerDoc.getElementById('ng-control-bar');
var headers = innerDoc.querySelectorAll('header');

try {
// Set the marginTop of roblox to be the same as the height of controlBar
var controlBarHeight = controlBar.offsetHeight || controlBar.clientHeight;
roblox.style.top = null;
roblox.style.marginTop = '110%'
controlBar.style.top = '91%';
headers.forEach(function(header) {
header.style.display = 'none';
});
console.log('Successfully injected Now.GG Script.');
} catch (err) {
console.error('Now.GG script injection failed.');
}
}

setInterval(fixNowGGScript, 5000);
}

1 comment on commit eac047b

@hop-deploy
Copy link

@hop-deploy hop-deploy bot commented on eac047b Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment Status Build Logs Updated At
v4 ✅ Deployed View Logs 2024-01-21T02:10:28.055Z

Please sign in to comment.