tiny changes

This commit is contained in:
Sky 2023-07-23 16:59:17 -04:00
parent 6ec9ebc0c8
commit 70ecadbae5
4 changed files with 28 additions and 36 deletions

View File

@ -18,6 +18,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script src="/js/cloak.js"></script>
</head>
<body>

View File

@ -1,15 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<script src="/js/all.js"></script>
<!-- https://codeshack.io/json-sorter/ key value -->
<style>@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');</style>
<link rel="stylesheet" href="/style.css">
<title>e-gamepass</title>
<link rel="icon" href="/favicon.png">
<meta name="keywords" content="front-end web developer, unblocked, games, google sites, unblocked games mom, ublocked, code, coding, programmer, development, javascript, jquery, bootstrap, sass, less, git, gaming, internet, website, best, site, cool, free games" />
<meta name="keywords" content="front-end web developer, unblocked, games, google sites, unblocked games mom, ublocked, code, coding, programmer, development, javascript, jquery, bootstrap, sass, less, git, gaming, internet, website, best, site, cool, free games" />
<meta property="og:title" content="Welcome to e-gamepass." />
<meta property="og:site_name" content="https://e-gamepass.pages.dev" />
<meta property="og:description" content="Welcome to the one and only option for unblocked games. Welcome to e-gamepass." />

View File

@ -1,23 +1,3 @@
// https://s2.googleusercontent.com/s2/favicons?domain=
function setCloakCookie() {
url = cloakExceptions($('#webicon').val())
document.cookie = 'tabicon=https://s2.googleusercontent.com/s2/favicons?domain_url=' + url;
document.cookie = 'tabname=' + $('#webname').val();
setCloak();
}
function clearCloak() {
document.cookie = "tabicon=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
document.cookie = "tabname=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
var link = document.querySelector("link[rel~='icon']");link.remove();
document.title = "Tab Cloak | e-gamepass";
link = document.createElement('link');
link.rel = 'icon';
document.head.appendChild(link);
link.href = "/favicon.png";
}
function setCloak() {
var tabicon = getCookie("tabicon");
@ -41,11 +21,7 @@ function setCloak() {
if (tabname) {
document.title = tabname;
}
// 'https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=' + $('#webicon').val() + '&size=32';
// 'https://s2.googleusercontent.com/s2/favicons?domain_url=' + $('#webicon').val()
}
function getCookie(cname) {
let name = cname + "=";
let decodedCookie = decodeURIComponent(document.cookie);
@ -64,11 +40,4 @@ function getCookie(cname) {
document.addEventListener("DOMContentLoaded", function() {
setCloak();
});
function cloakExceptions(url) {
if (url.includes('harrisonburg.instructure.com') == true) {
return "learn.canvas.net";
}
return url;
}
});

24
js/cloak.js Normal file
View File

@ -0,0 +1,24 @@
function cloakExceptions(url) {
if (url.includes('harrisonburg.instructure.com') == true) {
return "learn.canvas.net";
}
return url;
}
function setCloakCookie() {
url = cloakExceptions($('#webicon').val())
document.cookie = 'tabicon=https://s2.googleusercontent.com/s2/favicons?domain_url=' + url;
document.cookie = 'tabname=' + $('#webname').val();
setCloak();
}
function clearCloak() {
document.cookie = "tabicon=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
document.cookie = "tabname=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
var link = document.querySelector("link[rel~='icon']");link.remove();
document.title = "Tab Cloak | e-gamepass";
link = document.createElement('link');
link.rel = 'icon';
document.head.appendChild(link);
link.href = "/favicon.png";
}