From 776fe6e42a70f94913ada889b9423d8f463ca645 Mon Sep 17 00:00:00 2001 From: Sky Date: Fri, 28 Jul 2023 20:28:34 -0400 Subject: [PATCH] use prettier to make code.. prettier --- 404.html | 42 ++- bookmarklets.html | 81 +++-- changelog.html | 35 +- games.json | 772 ++++++++++++++++++++--------------------- index.html | 110 +++--- js/all.js | 110 +++--- js/cloak.js | 55 +-- js/cookie.js | 19 +- js/games.js | 238 ++++++------- js/open.js | 2 +- js/search.js | 22 +- js/ultimatetabcloak.js | 22 +- settings.html | 122 ++++--- style.css | 154 ++++---- 14 files changed, 905 insertions(+), 879 deletions(-) diff --git a/404.html b/404.html index 17aa9463..9b258039 100644 --- a/404.html +++ b/404.html @@ -1,31 +1,39 @@ - - + + - - + + e-gamepass - - + + - + -
- + +
+ +

e-gamepass🥺🥺

+
+

۶( ゚д゚) oopsies.. we couwdn't find the page you wewe wooking fow >w<

+ (๑•﹏•)⋆* ⁑⋆* pwease go home.. 👉👈
+ awso wepowt a bug by cwicking hewe.. (*/ω\*) me wouwd appweciate it.. this isnt nyowmaw :゚(ノω\)゚・。 +
diff --git a/bookmarklets.html b/bookmarklets.html index c758c008..278660de 100644 --- a/bookmarklets.html +++ b/bookmarklets.html @@ -1,55 +1,60 @@ + - - - - + + Bookmarklets | e-gamepass - - - + + + - + +
+ +

Bookmarklets

-
- + Edit any page +

Drag the link above to your bookmarks bar. This allows you to edit the text of any webpage.

+ X-Ray Goggles +

Drag the link above to your bookmarks bar. This allows you to view and edit the source code of any website, like a more powerful version of "Edit any page".

+ Dark Mode +

Drag the link above to your bookmarks bar. This sets any page to dark mode.

+ Piano +

Drag the link above to your bookmarks bar. This adds a piano to the page.

+ Developer Console +

Drag the link above to your bookmarks bar. This adds all features of the developer console to whatever page your on.

+ Asteroids +

Drag the link above to your bookmarks bar. This allows you to play Asteroids on the website you are on, destroying everything.

+ Katamari +

Drag the link above to your bookmarks bar. This allows you to collect the words on the page into a ball. Fun game, I recommend playing it.

-

Bookmarklets

- - - Edit any page -

Drag the link above to your bookmarks bar. This allows you to edit the text of any webpage.

- X-Ray Goggles -

Drag the link above to your bookmarks bar. This allows you to view and edit the source code of any website, like a more powerful version of "Edit any page".

- Dark Mode -

Drag the link above to your bookmarks bar. This sets any page to dark mode.

- Piano -

Drag the link above to your bookmarks bar. This adds a piano to the page.

- Developer Console -

Drag the link above to your bookmarks bar. This adds all features of the developer console to whatever page your on.

- Asteroids -

Drag the link above to your bookmarks bar. This allows you to play Asteroids on the website you are on, destroying everything.

- Katamari -

Drag the link above to your bookmarks bar. This allows you to collect the words on the page into a ball. Fun game, I recommend playing it.

- -

Tab Cloaks

- The Ultimate Tab Cloak -

Drag the link above to your bookmarks bar. This adds multiple cloaks in one bookmarklet.

- Tab Cloak (Canvas) -

Drag the link above to your bookmarks bar. This disguises whatever website you're on as the Canvas Dashboard.

- Tab Cloak (Google Drive) -

Drag the link above to your bookmarks bar. This disguises whatever website you're on as Google Drive.

- Tab Cloak (Desmos) -

Drag the link above to your bookmarks bar. This disguises whatever website you're on Desmos.

-
+

Tab Cloaks

+ The Ultimate Tab Cloak +

Drag the link above to your bookmarks bar. This adds multiple cloaks in one bookmarklet.

+ Tab Cloak (Canvas) +

Drag the link above to your bookmarks bar. This disguises whatever website you're on as the Canvas Dashboard.

+ Tab Cloak (Google Drive) +

Drag the link above to your bookmarks bar. This disguises whatever website you're on as Google Drive.

+ Tab Cloak (Desmos) +

Drag the link above to your bookmarks bar. This disguises whatever website you're on Desmos.

+
diff --git a/changelog.html b/changelog.html index cdc99ef0..3c3ecd7d 100644 --- a/changelog.html +++ b/changelog.html @@ -1,30 +1,33 @@ + - - - - + + Changelog | e-gamepass - - + + - + -
- -

e-gamepass

-

v. 2023.05.24

-

Added 3 games (Slope, This is the only level, achievement unlocked 2)
Fixed web analytics + google analytics (only affects me lol)

-

v. 2023.05.23

-

Major update?!
Added saves
Complete backend remake
Fixed flash pages to make them full screen automatically
Added 2 games (Cell Machine and Death Run 3D)
Added more bookmarklets
Tetris Update!

- Back to home -
+
+
+ +

e-gamepass

+
+

v. 2023.05.24

+

Added 3 games (Slope, This is the only level, achievement unlocked 2)
Fixed web analytics + google analytics (only affects me lol)

+

v. 2023.05.23

+

Major update?!
Added saves
Complete backend remake
Fixed flash pages to make them full screen automatically
Added 2 games (Cell Machine and Death Run 3D)
Added more bookmarklets
Tetris Update!

+ Back to home +
diff --git a/games.json b/games.json index 18c638c5..88d8d09d 100644 --- a/games.json +++ b/games.json @@ -1,387 +1,387 @@ [ - { - "name": "ADOFAI", - "directory": "adofai", - "image": "icon.png" - }, - { - "name": "Online Minecraft", - "directory": "resent-client", - "image": "logo.png" - }, - { - "name": "Offline Minecraft", - "directory": "offline-mc", - "image": "logo.png" - }, - { - "name": "Friday Night Funkin", - "directory": "fridaynightfunkin", - "image": "fnf-icon.jpg" - }, - { - "name": "Worlds Hardest Game", - "directory": "hardestgame", - "image": "icon.png" - }, - { - "name": "GBA Emulator", - "directory": "gba", - "image": "icon.png" - }, - { - "name": "Celeste", - "directory": "celeste", - "image": "icon.png" - }, - { - "name": "Mario", - "directory": "mario", - "image": "icon.png" - }, - { - "name": "60s Burger Run", - "directory": "60sburgerrun", - "image": "icon.png" - }, - { - "name": "Cluster Rush", - "directory": "cluster-rush", - "image": "icon.jpg" - }, - { - "name": "Vex 3", - "directory": "vex3", - "image": "icon.png" - }, - { - "name": "Adventure Capitalist", - "directory": "adventure-capitalist", - "image": "icon.png" - }, - { - "name": "Bloons TD 3", - "directory": "btd3", - "image": "icon.png" - }, - { - "name": "Avalanche", - "directory": "avalanche", - "image": "icon.png" - }, - { - "name": "Slope", - "directory": "slope", - "image": "slope4.jpeg" - }, - { - "name": "Cell Machine", - "directory": "cell-machine", - "image": "img/icon.png" - }, - { - "name": "Run 2", - "directory": "run2", - "image": "icon.jpg" - }, - { - "name": "Vex 5", - "directory": "vex5", - "image": "icon.png" - }, - { - "name": "Vex 4", - "directory": "vex4", - "image": "vex4.png" - }, - { - "name": "Vex 2", - "directory": "vex2", - "image": "icon.png" - }, - { - "name": "Crossy Road", - "directory": "crossyroad", - "image": "chicken.png" - }, - { - "name": "Wall Smash", - "directory": "wallsmash", - "image": "icon.png" - }, - { - "name": "Death Run 3D", - "directory": "death-run-3d", - "image": "img/death.png" - }, - { - "name": "Gun Mayhem 2", - "directory": "gunmayhem2", - "image": "icon.png" - }, - { - "name": "CircloO", - "directory": "circloo", - "image": "icon.png" - }, - { - "name": "Vex", - "directory": "vex", - "image": "icon.png" - }, - { - "name": "Stack", - "directory": "stack", - "image": "icon.png" - }, - { - "name": "xx142-b2.exe", - "directory": "xx142-b2.exe", - "image": "icon.png" - }, - { - "name": "paper.io", - "directory": "paperio", - "image": "icon.png" - }, - { - "name": "Chibi Knight", - "directory": "chibiknight", - "image": "icon.png" - }, - { - "name": "1v1.lol", - "directory": "1v1lol", - "image": "splash.png" - }, - { - "name": "Dino", - "directory": "dino", - "image": "icon.png" - }, - { - "name": "Turbowarp Packager", - "directory": "turbowarp", - "image": "icon.png" - }, - { - "name": "Tetris", - "directory": "tetris", - "image": "icon.png" - }, - { - "name": "Geometry Dash", - "directory": "gd", - "image": "icon.png" - }, - { - "name": "Sand Game", - "directory": "sand", - "image": "icon.png" - }, - { - "name": "Dante", - "directory": "dante", - "image": "icon.png" - }, - { - "name": "Wordle", - "directory": "wordle", - "image": "icon.png" - }, - { - "name": "Offline Paradise", - "directory": "offlineparadise", - "image": "icon.png" - }, - { - "name": "2048", - "directory": "2048", - "image": "icon.png" - }, - { - "name": "Doodle Jump", - "directory": "doodlejump", - "image": "icon.png" - }, - { - "name": "Weave Silk", - "directory": "weavesilk", - "image": "icon.png" - }, - { - "name": "Super Meat Boy", - "directory": "supermeatboy", - "image": "icon.png" - }, - { - "name": "Vex 6", - "directory": "vex6", - "image": "icon.png" - }, - { - "name": "WebGL Fluid Sim", - "directory": "fluidsim", - "image": "icon.png" - }, - { - "name": "Basketball Stars", - "directory": "basketball-stars", - "image": "icon.png" - }, - { - "name": "osu!", - "directory": "osu", - "image": "icon.png" - }, - { - "name": "Cookie Clicker", - "directory": "cookieclicker", - "image": "img/perfectCookie.png" - }, - { - "name": "Superhot", - "directory": "superhot", - "image": "icon.png" - }, - { - "name": "Super Mario 64", - "directory": "sm64", - "image": "icon.png" - }, - { - "name": "Gun Mayhem Redux", - "directory": "gunmayhemredux", - "image": "icon.png" - }, - { - "name": "I Wanna Be Thy Copy", - "directory": "iwbtc", - "image": "icon.png" - }, - { - "name": "HexGL", - "directory": "hexgl", - "image": "icon_128.png" - }, - { - "name": "Champion Island", - "directory": "championisland", - "image": "icon.png" - }, - { - "name": "Learn to Fly", - "directory": "ltf", - "image": "icon.png" - }, - { - "name": "Turbowarp Editor", - "directory": "turbowarp-editor", - "image": "icon.png" - }, - { - "name": "Wordle Bot", - "directory": "wordlebot", - "image": "icon.png" - }, - { - "name": "Cut The Rope", - "directory": "ctr", - "image": "icon.png" - }, - { - "name": "Chess", - "directory": "chess", - "image": "icon.png" - }, - { - "name": "Flappy Bird", - "directory": "flappybird", - "image": "icon.png" - }, - { - "name": "Lows Adventures 2", - "directory": "lowsadventures2", - "image": "icon.png" - }, - { - "name": "Drift Boss", - "directory": "drift-boss", - "image": "icon.png" - }, - { - "name": "Fireboy Watergirl", - "directory": "fireboywatergirl", - "image": "icon.png" - }, - { - "name": "Gun Mayhem", - "directory": "gunmayhem", - "image": "icon.png" - }, - { - "name": "Duck Life 4", - "directory": "ducklife4", - "image": "icon.png" - }, - { - "name": "Achievement Unlocked", - "directory": "achieveunlocked", - "image": "icon.png" - }, - { - "name": "Achievement Unlocked 2", - "directory": "achieveunlocked2", - "image": "icon.png" - }, - { - "name": "This Is The Only Level", - "directory": "thisistheonlylevel", - "image": "logo.png" - }, - { - "name": "This Is The Only Level 2", - "directory": "thisistheonlylevel2", - "image": "icon.png" - }, - { - "name": "Bitlife", - "directory": "bitlife", - "image": "bitlife.png" - }, - { - "name": "Duck Life 1", - "directory": "ducklife1", - "image": "ducklife1.png" - }, - { - "name": "Duck Life 2", - "directory": "ducklife2", - "image": "ducklife2.png" - }, - { - "name": "Duck Life 3", - "directory": "ducklife3", - "image": "ducklife3.png" - }, - { - "name": "ovo", - "directory": "ovo", - "image": "ovo3.png" - }, - { - "name": "There Is No Game", - "directory": "thereisnogame", - "image": "icon-256.png" - }, - { - "name": "Universal Paperclips", - "directory": "universal-paperclips", - "image": "universal-paperclips.png" - }, - { - "name": "Windows 11", - "directory": "win11", - "image": "favicon.png" - } - ] \ No newline at end of file + { + "name": "ADOFAI", + "directory": "adofai", + "image": "icon.png" + }, + { + "name": "Online Minecraft", + "directory": "resent-client", + "image": "logo.png" + }, + { + "name": "Offline Minecraft", + "directory": "offline-mc", + "image": "logo.png" + }, + { + "name": "Friday Night Funkin", + "directory": "fridaynightfunkin", + "image": "fnf-icon.jpg" + }, + { + "name": "Worlds Hardest Game", + "directory": "hardestgame", + "image": "icon.png" + }, + { + "name": "GBA Emulator", + "directory": "gba", + "image": "icon.png" + }, + { + "name": "Celeste", + "directory": "celeste", + "image": "icon.png" + }, + { + "name": "Mario", + "directory": "mario", + "image": "icon.png" + }, + { + "name": "60s Burger Run", + "directory": "60sburgerrun", + "image": "icon.png" + }, + { + "name": "Cluster Rush", + "directory": "cluster-rush", + "image": "icon.jpg" + }, + { + "name": "Vex 3", + "directory": "vex3", + "image": "icon.png" + }, + { + "name": "Adventure Capitalist", + "directory": "adventure-capitalist", + "image": "icon.png" + }, + { + "name": "Bloons TD 3", + "directory": "btd3", + "image": "icon.png" + }, + { + "name": "Avalanche", + "directory": "avalanche", + "image": "icon.png" + }, + { + "name": "Slope", + "directory": "slope", + "image": "slope4.jpeg" + }, + { + "name": "Cell Machine", + "directory": "cell-machine", + "image": "img/icon.png" + }, + { + "name": "Run 2", + "directory": "run2", + "image": "icon.jpg" + }, + { + "name": "Vex 5", + "directory": "vex5", + "image": "icon.png" + }, + { + "name": "Vex 4", + "directory": "vex4", + "image": "vex4.png" + }, + { + "name": "Vex 2", + "directory": "vex2", + "image": "icon.png" + }, + { + "name": "Crossy Road", + "directory": "crossyroad", + "image": "chicken.png" + }, + { + "name": "Wall Smash", + "directory": "wallsmash", + "image": "icon.png" + }, + { + "name": "Death Run 3D", + "directory": "death-run-3d", + "image": "img/death.png" + }, + { + "name": "Gun Mayhem 2", + "directory": "gunmayhem2", + "image": "icon.png" + }, + { + "name": "CircloO", + "directory": "circloo", + "image": "icon.png" + }, + { + "name": "Vex", + "directory": "vex", + "image": "icon.png" + }, + { + "name": "Stack", + "directory": "stack", + "image": "icon.png" + }, + { + "name": "xx142-b2.exe", + "directory": "xx142-b2.exe", + "image": "icon.png" + }, + { + "name": "paper.io", + "directory": "paperio", + "image": "icon.png" + }, + { + "name": "Chibi Knight", + "directory": "chibiknight", + "image": "icon.png" + }, + { + "name": "1v1.lol", + "directory": "1v1lol", + "image": "splash.png" + }, + { + "name": "Dino", + "directory": "dino", + "image": "icon.png" + }, + { + "name": "Turbowarp Packager", + "directory": "turbowarp", + "image": "icon.png" + }, + { + "name": "Tetris", + "directory": "tetris", + "image": "icon.png" + }, + { + "name": "Geometry Dash", + "directory": "gd", + "image": "icon.png" + }, + { + "name": "Sand Game", + "directory": "sand", + "image": "icon.png" + }, + { + "name": "Dante", + "directory": "dante", + "image": "icon.png" + }, + { + "name": "Wordle", + "directory": "wordle", + "image": "icon.png" + }, + { + "name": "Offline Paradise", + "directory": "offlineparadise", + "image": "icon.png" + }, + { + "name": "2048", + "directory": "2048", + "image": "icon.png" + }, + { + "name": "Doodle Jump", + "directory": "doodlejump", + "image": "icon.png" + }, + { + "name": "Weave Silk", + "directory": "weavesilk", + "image": "icon.png" + }, + { + "name": "Super Meat Boy", + "directory": "supermeatboy", + "image": "icon.png" + }, + { + "name": "Vex 6", + "directory": "vex6", + "image": "icon.png" + }, + { + "name": "WebGL Fluid Sim", + "directory": "fluidsim", + "image": "icon.png" + }, + { + "name": "Basketball Stars", + "directory": "basketball-stars", + "image": "icon.png" + }, + { + "name": "osu!", + "directory": "osu", + "image": "icon.png" + }, + { + "name": "Cookie Clicker", + "directory": "cookieclicker", + "image": "img/perfectCookie.png" + }, + { + "name": "Superhot", + "directory": "superhot", + "image": "icon.png" + }, + { + "name": "Super Mario 64", + "directory": "sm64", + "image": "icon.png" + }, + { + "name": "Gun Mayhem Redux", + "directory": "gunmayhemredux", + "image": "icon.png" + }, + { + "name": "I Wanna Be Thy Copy", + "directory": "iwbtc", + "image": "icon.png" + }, + { + "name": "HexGL", + "directory": "hexgl", + "image": "icon_128.png" + }, + { + "name": "Champion Island", + "directory": "championisland", + "image": "icon.png" + }, + { + "name": "Learn to Fly", + "directory": "ltf", + "image": "icon.png" + }, + { + "name": "Turbowarp Editor", + "directory": "turbowarp-editor", + "image": "icon.png" + }, + { + "name": "Wordle Bot", + "directory": "wordlebot", + "image": "icon.png" + }, + { + "name": "Cut The Rope", + "directory": "ctr", + "image": "icon.png" + }, + { + "name": "Chess", + "directory": "chess", + "image": "icon.png" + }, + { + "name": "Flappy Bird", + "directory": "flappybird", + "image": "icon.png" + }, + { + "name": "Lows Adventures 2", + "directory": "lowsadventures2", + "image": "icon.png" + }, + { + "name": "Drift Boss", + "directory": "drift-boss", + "image": "icon.png" + }, + { + "name": "Fireboy Watergirl", + "directory": "fireboywatergirl", + "image": "icon.png" + }, + { + "name": "Gun Mayhem", + "directory": "gunmayhem", + "image": "icon.png" + }, + { + "name": "Duck Life 4", + "directory": "ducklife4", + "image": "icon.png" + }, + { + "name": "Achievement Unlocked", + "directory": "achieveunlocked", + "image": "icon.png" + }, + { + "name": "Achievement Unlocked 2", + "directory": "achieveunlocked2", + "image": "icon.png" + }, + { + "name": "This Is The Only Level", + "directory": "thisistheonlylevel", + "image": "logo.png" + }, + { + "name": "This Is The Only Level 2", + "directory": "thisistheonlylevel2", + "image": "icon.png" + }, + { + "name": "Bitlife", + "directory": "bitlife", + "image": "bitlife.png" + }, + { + "name": "Duck Life 1", + "directory": "ducklife1", + "image": "ducklife1.png" + }, + { + "name": "Duck Life 2", + "directory": "ducklife2", + "image": "ducklife2.png" + }, + { + "name": "Duck Life 3", + "directory": "ducklife3", + "image": "ducklife3.png" + }, + { + "name": "ovo", + "directory": "ovo", + "image": "ovo3.png" + }, + { + "name": "There Is No Game", + "directory": "thereisnogame", + "image": "icon-256.png" + }, + { + "name": "Universal Paperclips", + "directory": "universal-paperclips", + "image": "universal-paperclips.png" + }, + { + "name": "Windows 11", + "directory": "win11", + "image": "favicon.png" + } +] diff --git a/index.html b/index.html index bdd33621..f0b6aae9 100644 --- a/index.html +++ b/index.html @@ -1,69 +1,77 @@ - - + + + + + + - - - - - - - - + + e-gamepass - - + + - - - - - - - + + + + + -
- +
+ - + - -

e-gamepass

- Download SaveUpload Save -
-

-
-
-

Pinned Games

-
-

Looks like you haven't pinned any games, click the star icon next to any game in order to pin them up here!

-
-

All Games

-

Please wait for the games to load.. If you see this for more than a second, try reloading and reporting a bug report.

+
+ +

e-gamepass

+
+ Download SaveUpload Save +
+

+ +
+
+

Pinned Games

+
+

Looks like you haven't pinned any games, click the star icon next to any game in order to pin them up here! Your pinned games will also save in your save backups!

+
+

All Games

+

Please wait for the games to load.. If you see this for more than a second, try reloading and reporting a bug report.

+
- -
diff --git a/js/all.js b/js/all.js index addfcac0..e666e97e 100644 --- a/js/all.js +++ b/js/all.js @@ -1,70 +1,68 @@ - function setCloak() { - var tabicon = getCookie("tabicon"); + var tabicon = getCookie("tabicon"); - if (tabicon) { - var link = document.querySelector("link[rel~='icon']"); - if(link){ - link.remove(); - } - var link = document.querySelector("link[rel~='shortcut icon']"); - if(link){ - link.remove(); - } - link = document.createElement('link'); - link.rel = 'icon'; - document.head.appendChild(link); - link.href = tabicon; + if (tabicon) { + var link = document.querySelector("link[rel~='icon']"); + if (link) { + link.remove(); } - - var tabname = getCookie("tabname"); - - if (tabname) { - document.title = tabname; + var link = document.querySelector("link[rel~='shortcut icon']"); + if (link) { + link.remove(); } + link = document.createElement("link"); + link.rel = "icon"; + document.head.appendChild(link); + link.href = tabicon; + } + + var tabname = getCookie("tabname"); + + if (tabname) { + document.title = tabname; + } } function getCookie(cname) { - let name = cname + "="; - let decodedCookie = decodeURIComponent(document.cookie); - let ca = decodedCookie.split(';'); - for(let i = 0; i 0) { - - $("#panicmode").prop({href: panicurl}) + if ($("#panicmode").length > 0) { + $("#panicmode").prop({ href: panicurl }); + } + const pressed = []; + const secretCode = "safemode"; + window.addEventListener("keyup", (e) => { + pressed.push(e.key); + pressed.splice(-secretCode.length - 1, pressed.length - secretCode.length); + if (pressed.join("").includes(secretCode)) { + window.location.href = panicurl; } - const pressed = []; - const secretCode = 'safemode'; - window.addEventListener('keyup', (e) => { - pressed.push(e.key); - pressed.splice(-secretCode.length - 1 , pressed.length - secretCode.length); - if (pressed.join('').includes(secretCode)) { - window.location.href = panicurl; - } - }); + }); } -document.addEventListener("DOMContentLoaded", function() { - let jquery_loader = document.createElement('script'); - jquery_loader.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js'); - jquery_loader.async = false; - document.body.appendChild(jquery_loader); - window.addEventListener('load', function() { - panicMode(); - }) - setCloak(); -}); \ No newline at end of file +document.addEventListener("DOMContentLoaded", function () { + let jquery_loader = document.createElement("script"); + jquery_loader.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"); + jquery_loader.async = false; + document.body.appendChild(jquery_loader); + window.addEventListener("load", function () { + panicMode(); + }); + setCloak(); +}); diff --git a/js/cloak.js b/js/cloak.js index 9922fa49..c1d20240 100644 --- a/js/cloak.js +++ b/js/cloak.js @@ -1,34 +1,35 @@ function cloakExceptions(url) { - if (url.includes('harrisonburg.instructure.com') == true) { - return "learn.canvas.net"; - } - return 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(); - Toastify({ - text: 'Tab cloak saved!', - duration: 2000, - gravity: "top", // `top` or `bottom` - position: "center", // `left`, `center` or `right` - style: { - background: "linear-gradient(42deg, rgba(36, 69, 128, 1) 100%, rgb(24, 17, 87) 0%)" - }, - onClick: function(){} // Callback after click - }).showToast(); - setCloak(); + url = cloakExceptions($("#webicon").val()); + document.cookie = "tabicon=https://s2.googleusercontent.com/s2/favicons?domain_url=" + url; + document.cookie = "tabname=" + $("#webname").val(); + Toastify({ + text: "Tab cloak saved!", + duration: 2000, + gravity: "top", // `top` or `bottom` + position: "center", // `left`, `center` or `right` + style: { + background: "linear-gradient(42deg, rgba(36, 69, 128, 1) 100%, rgb(24, 17, 87) 0%)", + }, + onClick: function () {}, // Callback after click + }).showToast(); + 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"; -} \ No newline at end of file + 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"; +} diff --git a/js/cookie.js b/js/cookie.js index c31e798c..088d69ac 100644 --- a/js/cookie.js +++ b/js/cookie.js @@ -2,7 +2,7 @@ function getMainSave() { var mainSave = {}; // List of items in localStorage that should not be saved - var localStorageDontSave = ['tabicon', 'tabname']; + var localStorageDontSave = ["tabicon", "tabname"]; // Convert localStorage to an array of key-value pairs and remove the items that should not be saved localStorageSave = Object.entries(localStorage); @@ -28,7 +28,7 @@ function getMainSave() { mainSave = btoa(JSON.stringify(mainSave)); // Encrypt the mainSave data using AES encryption with the key 'save' - mainSave = CryptoJS.AES.encrypt(mainSave, 'egamepass').toString(); + mainSave = CryptoJS.AES.encrypt(mainSave, "egamepass").toString(); // Return the encrypted mainSave data return mainSave; @@ -39,9 +39,9 @@ function downloadMainSave() { var data = new Blob([getMainSave()]); var dataURL = URL.createObjectURL(data); - var fakeElement = document.createElement('a'); + var fakeElement = document.createElement("a"); fakeElement.href = dataURL; - fakeElement.download = 'your.e-gamepass.save'; + fakeElement.download = "your.e-gamepass.save"; fakeElement.click(); URL.revokeObjectURL(dataURL); Toastify({ @@ -52,14 +52,14 @@ function downloadMainSave() { style: { background: "linear-gradient(42deg, rgba(36, 69, 128, 1) 100%, rgb(24, 17, 87) 0%)", }, - onClick: function(){} // Callback after click + onClick: function () {}, // Callback after click }).showToast(); } // Function to get the main save data from an uploaded file function getMainSaveFromUpload(data) { // Decrypt the uploaded data using AES decryption with the key 'save' - data = CryptoJS.AES.decrypt(data, 'egamepass').toString(CryptoJS.enc.Utf8); + data = CryptoJS.AES.decrypt(data, "egamepass").toString(CryptoJS.enc.Utf8); // Parse the decrypted data as JSON var mainSave = JSON.parse(atob(data)); @@ -77,11 +77,11 @@ function getMainSaveFromUpload(data) { // Function to handle the file upload function uploadMainSave() { - var hiddenUpload = document.querySelector('.hiddenUpload'); + var hiddenUpload = document.querySelector(".hiddenUpload"); hiddenUpload.click(); // Listen for the change event on the file input element - hiddenUpload.addEventListener('change', function (e) { + hiddenUpload.addEventListener("change", function (e) { var files = e.target.files; var file = files[0]; if (!file) { @@ -104,9 +104,8 @@ function uploadMainSave() { style: { background: "linear-gradient(42deg, rgba(36, 69, 128, 1) 100%, rgb(24, 17, 87) 0%)", }, - onClick: function(){} // Callback after click + onClick: function () {}, // Callback after click }).showToast(); - }; reader.readAsText(file); diff --git a/js/games.js b/js/games.js index ad8a1c88..cd560cf2 100644 --- a/js/games.js +++ b/js/games.js @@ -1,133 +1,137 @@ $.getJSON("/games.json", function (data) { - - starredgames = getCookie("starred"); - if(starredgames == "") { - starredgames = [] - } else { - starredgames = JSON.parse(starredgames) + starredgames = getCookie("starred"); + if (starredgames == "") { + starredgames = []; + } else { + starredgames = JSON.parse(starredgames); + } + console.log(starredgames); + $("#gamesearch").prop({ placeholder: "Click here to search through our " + data.length + " games!" }); + data.sort(dynamicSort("name")); + for (let i = 0; i < data.length; i++) { + let $element = $("
") + .prop({ + class: "game", + style: "cursor: pointer;", + id: data[i].directory, + }) + .append( + $("").prop({ + src: data[i].directory + "/" + data[i].image, + alt: data[i].name + " logo", + }) + ) + .append($("

").text(data[i].name)) + .append( + $("") + .prop({ + class: "material-symbols-rounded", + }) + .text("star") + ); + if (starredgames.includes(data[i].directory)) { + $element.find("mat-icon").attr("id", "starred"); + let $pinnedelement = $element.clone(); + $("#pinnedgames").append($pinnedelement); + if ($("#pinnedgames #message")) { + $("#pinnedmessage").hide(); + } } - console.log(starredgames); - $("#gamesearch").prop({placeholder: "Click here to search through our " + data.length + " games!"}); - data.sort(dynamicSort("name")); - for (let i = 0; i < data.length; i++) { - let $element = $('
').prop({ - class: 'game', - style: 'cursor: pointer;', - id: data[i].directory - }).append( - $('').prop({ - src: data[i].directory + "/" + data[i].image, - alt: data[i].name + " logo" - }) - ).append( - $('

').text(data[i].name) - ).append( - $("").prop({ - class: 'material-symbols-rounded' - }).text("star") - ); - - if (starredgames.includes(data[i].directory)) { - $element.find("mat-icon").attr("id", "starred"); - let $pinnedelement = $element.clone(); - $('#pinnedgames').append($pinnedelement); - if($("#pinnedgames #message")) { - $("#pinnedmessage").hide(); - } - - } - - $('#games').append($element); - } - $("#games #message").remove(); + $("#games").append($element); + } + $("#games #message").remove(); }); -$(document).ready(function() { - let starred; - $(document).on("click", ".game", function(event) { - if($(event.target).is('mat-icon')) { - if(!$(event.target).attr("id")) { - $(event.target).prop({id: "starred"}) - starred = Cookies.get("starred") - if(starred) { - starred = JSON.parse(starred); - } else { - starred = [] - } - starred.push($(this).attr("id")); - Cookies.set("starred", JSON.stringify(starred)); - $element = $(this).clone(); - $('#pinnedgames').append($element); - $("#pinnedmessage").hide(); - temp = $('#pinnedgames')[0].childNodes; - pinnedarray = [...temp] - - pinnedarray.sort(dynamicSort("id")); - $("#pinnedgames").empty(); - for (let i = 0; i < pinnedarray.length; i++) { - pinnedarraynodes = pinnedarray[i].childNodes; - pinnedarraynodes = [...pinnedarraynodes] - let $element = $('
').prop({ - class: 'game', - style: 'cursor: pointer;', - id: pinnedarray[i].id - }).append( - $('').prop({ - src: pinnedarraynodes[0].src, - alt: pinnedarraynodes[0].alt - }) - ).append( - $('

').text(pinnedarraynodes[1].innerHTML) - ).append( - $("").prop({ - class: 'material-symbols-rounded', - id: 'starred' - }).text("star") - ); - $('#pinnedgames').append($element); - } - } else { - $(event.target).removeAttr("id"); - $thisdiv = '#' + $(this).attr("id") - $thisdiv = $thisdiv.replace(".", "\\."); - starred = Cookies.get("starred") - starred = JSON.parse(starred); - ourindex = starred.indexOf($(this).attr("id")); - starred.splice(ourindex, 1); - Cookies.set("starred", JSON.stringify(starred)); - $("#pinnedgames " + $thisdiv).remove(); - if($('#pinnedgames').is(':empty')) { - $("#pinnedmessage").show(); - } - $($thisdiv + " #starred").removeAttr("id"); - } +$(document).ready(function () { + let starred; + $(document).on("click", ".game", function (event) { + if ($(event.target).is("mat-icon")) { + if (!$(event.target).attr("id")) { + $(event.target).prop({ id: "starred" }); + starred = Cookies.get("starred"); + if (starred) { + starred = JSON.parse(starred); } else { - redirectGame($(this).attr("id")); + starred = []; } - }); - $(document).on("click", "#game span", function(event) { - $(this).prop({class: "material-symbols-outlined fill"}) - }); + starred.push($(this).attr("id")); + Cookies.set("starred", JSON.stringify(starred)); + $element = $(this).clone(); + $("#pinnedgames").append($element); + $("#pinnedmessage").hide(); + temp = $("#pinnedgames")[0].childNodes; + pinnedarray = [...temp]; + + pinnedarray.sort(dynamicSort("id")); + $("#pinnedgames").empty(); + for (let i = 0; i < pinnedarray.length; i++) { + pinnedarraynodes = pinnedarray[i].childNodes; + pinnedarraynodes = [...pinnedarraynodes]; + let $element = $("
") + .prop({ + class: "game", + style: "cursor: pointer;", + id: pinnedarray[i].id, + }) + .append( + $("").prop({ + src: pinnedarraynodes[0].src, + alt: pinnedarraynodes[0].alt, + }) + ) + .append($("

").text(pinnedarraynodes[1].innerHTML)) + .append( + $("") + .prop({ + class: "material-symbols-rounded", + id: "starred", + }) + .text("star") + ); + $("#pinnedgames").append($element); + } + } else { + $(event.target).removeAttr("id"); + $thisdiv = "#" + $(this).attr("id"); + $thisdiv = $thisdiv.replace(".", "\\."); + starred = Cookies.get("starred"); + starred = JSON.parse(starred); + ourindex = starred.indexOf($(this).attr("id")); + starred.splice(ourindex, 1); + Cookies.set("starred", JSON.stringify(starred)); + $("#pinnedgames " + $thisdiv).remove(); + if ($("#pinnedgames").is(":empty")) { + $("#pinnedmessage").show(); + } + $($thisdiv + " #starred").removeAttr("id"); + } + } else { + redirectGame($(this).attr("id")); + } + }); + $(document).on("click", "#game span", function (event) { + $(this).prop({ class: "material-symbols-outlined fill" }); + }); }); function redirectGame(dir) { - window.location.href = window.location.origin + "/" + dir + "/index.html"; + window.location.href = window.location.origin + "/" + dir + "/index.html"; } function dynamicSort(property) { - var sortOrder = 1; + var sortOrder = 1; - if(property[0] === "-") { - sortOrder = -1; - property = property.substr(1); - } + if (property[0] === "-") { + sortOrder = -1; + property = property.substr(1); + } - return function (a,b) { - if(sortOrder == -1){ - return b[property].localeCompare(a[property]); - }else{ - return a[property].localeCompare(b[property]); - } + return function (a, b) { + if (sortOrder == -1) { + return b[property].localeCompare(a[property]); + } else { + return a[property].localeCompare(b[property]); } -} \ No newline at end of file + }; +} diff --git a/js/open.js b/js/open.js index 9f54e850..07ab2dff 100644 --- a/js/open.js +++ b/js/open.js @@ -18,4 +18,4 @@ document.getElementById("create").onclick = function () { iframe.allow = "fullscreen"; iframe.src = url.value; win.document.body.appendChild(iframe); -} \ No newline at end of file +}; diff --git a/js/search.js b/js/search.js index 26afc66b..00b5c68a 100644 --- a/js/search.js +++ b/js/search.js @@ -1,11 +1,11 @@ -$(document).ready(function() { - $('#gamesearch').on('input propertychange paste', function() { - $('#games .game').hide(); - var txt = $('#gamesearch').val(); - $('#games .game').each(function(){ - if($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1){ - $(this).show(); - } - }); - }); -}); \ No newline at end of file +$(document).ready(function () { + $("#gamesearch").on("input propertychange paste", function () { + $("#games .game").hide(); + var txt = $("#gamesearch").val(); + $("#games .game").each(function () { + if ($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1) { + $(this).show(); + } + }); + }); +}); diff --git a/js/ultimatetabcloak.js b/js/ultimatetabcloak.js index f53a2777..36e80689 100644 --- a/js/ultimatetabcloak.js +++ b/js/ultimatetabcloak.js @@ -1,17 +1,5 @@ - -var l = - document.querySelector("link[rel*='icon']") || document.createElement('link') -l.type = 'image/x-icon' -l.rel = 'shortcut icon' -var c = prompt('Select a tab cloak\n1. Canvas\n2. e-hallpass\n3. New Tab') -1 == c - ? ((l.href = 'https://harrisonburg.instructure.com/favicon.ico'), - (document.title = 'Dashboard')) - : 2 == c - ? ((l.href = - 'https://eduspiresolutions.org/wp-content/uploads/2020/09/cropped-favicon-270x270-1-150x150.png'), - (document.title = 'Digital Hall Pass | e-Hall Pass | Eduspire Solutions')) - : 3 == c && - ((l.href = - 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA/UlEQVR42q2S0Q3CMAxEGYERGIFP1FJ0JEXikw1gA9gANqAbwCaMwAgdoSNAHpVRE7UIISKd1Dq+s33O6O9H0ngudyzk67n8o0V5z+UvM60nH8kL+W0gNJAG0ORyh15yJrcj6RtQaKj1V/VQhfb3M2kyhIgckqtWoDxBJiHTakoc2Ozh/ogXIOoCkwqVZ0QK+Q2ExIsGQea3WBCp3wIWJKn9X1Y9s1d01o2lAuD2k0C8cymTpmYo4BtyvCl373pw6s6GBxDMRATTQsR7V2giuIwId7aBtKOvHhJC6VZylf2vkTXFnbi6jfurVS5CodGnY7Njkr0JZscnG+ev5wl1Bukqc4CB7gAAAABJRU5ErkJggg=='), - (document.title = 'New Tab')) +var l = document.querySelector("link[rel*='icon']") || document.createElement("link"); +l.type = "image/x-icon"; +l.rel = "shortcut icon"; +var c = prompt("Select a tab cloak\n1. Canvas\n2. e-hallpass\n3. New Tab"); +1 == c ? ((l.href = "https://harrisonburg.instructure.com/favicon.ico"), (document.title = "Dashboard")) : 2 == c ? ((l.href = "https://eduspiresolutions.org/wp-content/uploads/2020/09/cropped-favicon-270x270-1-150x150.png"), (document.title = "Digital Hall Pass | e-Hall Pass | Eduspire Solutions")) : 3 == c && ((l.href = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA/UlEQVR42q2S0Q3CMAxEGYERGIFP1FJ0JEXikw1gA9gANqAbwCaMwAgdoSNAHpVRE7UIISKd1Dq+s33O6O9H0ngudyzk67n8o0V5z+UvM60nH8kL+W0gNJAG0ORyh15yJrcj6RtQaKj1V/VQhfb3M2kyhIgckqtWoDxBJiHTakoc2Ozh/ogXIOoCkwqVZ0QK+Q2ExIsGQea3WBCp3wIWJKn9X1Y9s1d01o2lAuD2k0C8cymTpmYo4BtyvCl373pw6s6GBxDMRATTQsR7V2giuIwId7aBtKOvHhJC6VZylf2vkTXFnbi6jfurVS5CodGnY7Njkr0JZscnG+ev5wl1Bukqc4CB7gAAAABJRU5ErkJggg=="), (document.title = "New Tab")); diff --git a/settings.html b/settings.html index fdcc1d60..b43f9c34 100644 --- a/settings.html +++ b/settings.html @@ -1,76 +1,86 @@ + + + - - - - - - + + Tab Cloak | e-gamepass - - + + - - - - - + + + - + -
- +
+ - + +
+ +

e-gamepass

+
-

e-gamepass

- -
-
-

Website URL


-
- -
-
-
-

Website Name


-
-

Website Icon


-

- -
+
+
+

Website URL

+
+
+ +
+
+
+

Website Name

+
+
+

Website Icon

+
+

+ +
-
+
-
- -
+
+
diff --git a/style.css b/style.css index ab68e0c0..1cf0e836 100644 --- a/style.css +++ b/style.css @@ -1,45 +1,42 @@ html { - text-align: center; - align-content: center; - font-family: "Share Tech Mono", monospace; - padding: 0; - } + text-align: center; + align-content: center; + font-family: "Share Tech Mono", monospace; + padding: 0; +} .content { animation: fadeIn 5s; - width:90%; - margin: 0 auto; + width: 90%; + margin: 0 auto; } button { background-color: rgba(89, 110, 177, 0.5); color: #8daad8; - border: 2px solid #527ac4bb ; + border: 2px solid #527ac4bb; border-radius: 6px; padding: 5px 13px; margin-bottom: 6px; margin: 10px; transition-duration: 0.45s; - font-size: 20px; - color: #6983da; - font-family: "Share Tech Mono", monospace; - text-underline-position: under; - opacity: 70%; + font-size: 20px; + color: #6983da; + font-family: "Share Tech Mono", monospace; + text-underline-position: under; + opacity: 70%; } button:hover { - cursor:pointer; + cursor: pointer; opacity: 90%; } - h2 { - font-size: 42px; - color: #0073e6; - margin-top: 3%; - } - - +h2 { + font-size: 42px; + color: #0073e6; + margin-top: 3%; +} - .game { width: 13%; display: inline-block; @@ -61,7 +58,7 @@ button:hover { .game h1 { float: right; font-size: 0.85em; - color: rgb(149, 186, 241) + color: rgb(149, 186, 241); } .game img { width: 100%; @@ -80,50 +77,64 @@ a { a:hover { color: #b0c2fa; } - + .bookmarklet { font-size: 25px; } - .title { display: flex; align-items: center; justify-content: center; - } +} - @keyframes fadeIn { - 0% {opacity: 0;} - 20% {opacity: 40;} - 80% {opacity: 90;} - 90% {opacity: 92;} - 100% {opacity: 100;} +@keyframes fadeIn { + 0% { + opacity: 0; } - - @keyframes fadeInPadding { - 0% {padding-left: 0%;padding-right: 0%;} - 100% {padding-left: 5%;padding-right: 5%;} + 20% { + opacity: 40; } + 80% { + opacity: 90; + } + 90% { + opacity: 92; + } + 100% { + opacity: 100; + } +} + +@keyframes fadeInPadding { + 0% { + padding-left: 0%; + padding-right: 0%; + } + 100% { + padding-left: 5%; + padding-right: 5%; + } +} body { - background: repeating-linear-gradient(45deg, rgba(36, 69, 128, 1) 0%, rgb(24, 17, 87) 33%, rgba(36, 69, 128, 1) 66%, rgb(24, 17, 87) 100%); - background-size: 400% 400%; - background-attachment: fixed; - animation: gradient 30s linear infinite; - height: 100vh; + background: repeating-linear-gradient(45deg, rgba(36, 69, 128, 1) 0%, rgb(24, 17, 87) 33%, rgba(36, 69, 128, 1) 66%, rgb(24, 17, 87) 100%); + background-size: 400% 400%; + background-attachment: fixed; + animation: gradient 30s linear infinite; + height: 100vh; } - + @keyframes gradient { 0% { - background-position: 100% 0% -} -100% { - background-position: 15% 100% -} + background-position: 100% 0%; + } + 100% { + background-position: 15% 100%; + } } - -input[type=text] { +input[type="text"] { margin-top: 15px; width: 50%; box-sizing: border-box; @@ -132,26 +143,26 @@ input[type=text] { padding: 0.8% 0.8%; text-align: center; color: rgb(149, 186, 241); - border: 2px solid #527ac4bb ; + border: 2px solid #527ac4bb; border-radius: 5px; outline: none; opacity: 70%; - transition: opacity .25s ease-in-out; + transition: opacity 0.25s ease-in-out; font-family: "Share Tech Mono", monospace; } -input[type=text]:hover { +input[type="text"]:hover { opacity: 80%; } -input[type=text]:focus { +input[type="text"]:focus { opacity: 100%; } -::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ +::placeholder { + /* Chrome, Firefox, Opera, Safari 10.1+ */ color: rgb(149, 186, 241); opacity: 0.6; /* Firefox */ } - ul { list-style-type: none; padding: 0; @@ -176,15 +187,14 @@ p { padding: 0.8% 0.8%; text-align: center; color: rgb(149, 186, 241); - border: 2px solid #527ac4bb ; + border: 2px solid #527ac4bb; border-radius: 5px; outline: none; opacity: 70%; - transition: opacity .25s ease-in-out; + transition: opacity 0.25s ease-in-out; font-family: "Share Tech Mono", monospace; } - h3 { font-size: 20px; padding: 0; @@ -194,20 +204,20 @@ h3 { .submit { background-color: rgba(89, 110, 177, 0.5); color: #8daad8; - border: 2px solid #527ac4bb ; + border: 2px solid #527ac4bb; border-radius: 6px; padding: 5px 13px; margin-bottom: 6px; margin: 10px; transition-duration: 0.45s; - font-size: 20px; - color: #6983da; - font-family: "Share Tech Mono", monospace; - text-underline-position: under; - opacity: 70%; + font-size: 20px; + color: #6983da; + font-family: "Share Tech Mono", monospace; + text-underline-position: under; + opacity: 70%; } .submit:hover { - cursor:pointer; + cursor: pointer; opacity: 90%; } @@ -216,17 +226,9 @@ h3 { color: white; font-size: 1.9em; transition-duration: 0.75s; - font-variation-settings: - 'FILL' 0, - 'wght' 400, - 'GRAD' 0, - 'opsz' 48 + font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48; } #starred { - font-variation-settings: - 'FILL' 1, - 'wght' 400, - 'GRAD' 0, - 'opsz' 48 -} \ No newline at end of file + font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 48; +}