Skip to content

Commit

Permalink
pp
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaAppsInc committed Apr 14, 2022
1 parent a547924 commit 9862f7d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
21 changes: 14 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@
<title>Fracital</title>
<link rel="stylesheet" href="./styles/style.css" id="rels">
<link rel="shortcut icon" href="./resources/favicon.ico" id="relt" type="image/x-icon">
<script src="/uv/uv.bundle.js"></script>
<script src="/uv/uv.config.js"></script>
<script async src="https://arc.io/widget.min.js#9RNMA9a8"></script>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js', {
scope: '/sw/',
});
};
</script>
</head>
<body>
<div class="toolbar" id="toolbar" role="banner">
Expand Down Expand Up @@ -107,13 +116,11 @@ <h3 class="infql">Quick Launch sites</h3>
</div>
</div>
<iframe src="home.html" frameborder="0" class="frame nonec" id="frame"></iframe>
<div class="alertbtm" id="alert">
<p class="alert">You will now need to dm us to join the Fracital server because school IT's be goofy!</a></p>
</div>
<!-- <div class="alertbtm" id="alert">
<p class="alert">You can search lyrics from the drop down menu!</a></p>
</div> -->
</body>
<script src="js/alerts.js"></script>
<script src="./js/alerts.js"></script>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<script src="/js/index.js"></script>
<script src="/uv/uv.bundle.js"></script>
<script src="/uv/uv.config.js"></script>
<script src="./js/index.js"></script>
</html>
30 changes: 19 additions & 11 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
class xor {
static encode(str) {
return encodeURIComponent(str.toString().split('').map((char, ind) => ind % 2 ? String.fromCharCode(char.charCodeAt() ^ 2) : char).join(''));
};
static decode(str) {
return decodeURIComponent(str.slice(0, -1)).split('').map((char, ind) => ind % 2 ? String.fromCharCode(char.charCodeAt() ^ 2) : char).join('');
};
};

function selectElement(selector) {
return document.querySelector(selector);
}
const urlBar = document.getElementById('urlbar').value;

const frame = document.getElementById("frame");
const settb = document.getElementById("settb");
const toolb = document.getElementById("toolbar");
const toolb = document.getElementById("toolbar")

settb.addEventListener("click", () => {
frame.src = "settings.html"
});
})

let tlds = [".com", ".net", ".org", ".co", ".lol", ".gg", ".fun", ".ga", ".xyz", ".to", ".cc", ".info", ".io", ".tv"];

document.cookie="olds=sus";

function go(link) {
window.navigator.serviceWorker.register('../sw.js', {
scope: __uv$config.prefix
});
if (link == '') {
alert('Bruh you need to insert a url!');
} else if (!(link.startsWith('https://') || link.startsWith('http://'))) link = 'http://' + urlBar;
} else if (!link.includes("http://")) {
link = "http://" + link;
}
if(!link.includes(".")) {
alert(`alright bro come on "${urlBar}" ain't even a url!`)
alert(`alright bro come on "${document.getElementById('urlbar').value}" ain't even a url!`)
return;
// go("bing.com/search?q=" + document.getElementById('urlbar').value);
}
frame.src = __uv$config.prefix + __uv$config.encodeUrl(link);
document.getElementById("frame").src="/sw/"+xor.encode(link);
};

document.getElementById("btnsrch").addEventListener("click", () => {
Expand Down Expand Up @@ -94,7 +102,7 @@ let observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
if (mutation.type == "attributes") {
if(!document.getElementById("urlbar").src == "") {
document.getElementById("urlbar").src=__uv$config.decode(frame.contentWindow.location.href.split(__uv$config.prefix)[1]);
document.getElementById("urlbar").src=xor.decode(document.getElementById("frame").contentWindow.location.href.split('/sw/')[1]);
}
};
});
Expand Down Expand Up @@ -227,4 +235,4 @@ function lyric() {
// case 'classic':
// document.getElementById("rels").href = "../styles/style.css";
// break;
// }
// }

0 comments on commit 9862f7d

Please sign in to comment.