settings fix

This commit is contained in:
Sky 2023-09-18 16:35:02 -04:00
parent b58b393099
commit c3f847aa45
4 changed files with 64 additions and 4 deletions

59
blank.html Normal file
View File

@ -0,0 +1,59 @@
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
let url;
getCDN();
async function getCDN() {
$.getJSON(
"https://raw.githubusercontent.com/skysthelimitt/selenite-optimized/main/links.json",
async function (data) {
cdnurls = data["urls"];
for (let i = 0; i < cdnurls.length; i++) {
var check = await fetch(cdnurls[i] + "/README.md");
var checktext = await check.text();
if (checktext.startsWith("## Selenite")) {
console.log("CDN Found: " + cdnurls[i]);
url = cdnurls[i];
createBlank();
break;
} else {
console.log("CDN Blocked: " + cdnurls[i]);
}
}
if (!url) {
alert(
"looks like none of the cdns are available, please check again later."
);
}
}
);
}
function createBlank() {
win = window.open();
win.document.body.style.margin = "0";
win.document.body.style.height = "100vh";
var iframe = win.document.createElement("iframe");
iframe.style.border = "none";
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.margin = "0";
iframe.referrerpolicy = "no-referrer";
iframe.allow = "fullscreen";
iframe.src = url;
win.document.body.appendChild(iframe);
}
</script>
<style>
body {
background-color: black;
color: white;
text-align: center;
align-content: center;
}
</style>
</head>
<body>
<h1>looking for url..</h1>
</body>
</html>

View File

@ -6,6 +6,7 @@
<script type="text/javascript">
window.cookieconsent_options = {"message":"Unsurprisingly, this website uses cookies for ads and traffic analysis.","dismiss":"Got it!","learnMore":"Learn more","link":"//orteil.dashnet.org/cookieconsentpolicy.html","target":"_blank","theme":"//orteil.dashnet.org/cookieconsent.css","domain":"dashnet.org"};
</script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js"></script>

View File

@ -69,7 +69,7 @@ function panicMode() {
}
const head = document.getElementsByTagName('head')[0];
window.onload = function() {
document.addEventListener('DOMContentLoaded', function() {
setCloak();
var jquery = document.createElement('script');
jquery.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js';
@ -82,7 +82,7 @@ window.onload = function() {
gtag('js', new Date());
gtag('config', 'G-98DP5VKS42');`;
document.head.append(gscript, ingscript, jquery);
}
}, false);
defer(function () {
panicMode();

View File

@ -13,7 +13,7 @@ function check() {
}
}
window.onload = function () {
document.addEventListener('DOMContentLoaded', function() {
if (localStorage.getItem("theme")) {
document.body.setAttribute("theme", localStorage.getItem("theme"));
} else {
@ -21,7 +21,7 @@ window.onload = function () {
}
checkAlert();
check();
};
});
function checkAlert() {
if (!Cookies.get("supportalert")) {