From 14b61b43512158f1a12328e592557195433f4a68 Mon Sep 17 00:00:00 2001 From: Sid Alapati Date: Tue, 29 Oct 2024 19:40:43 -0400 Subject: [PATCH] added option to use website without cloaking to support more devices --- css/style.css | 13 +++++++++++-- index.html | 5 +++-- js/index.js | 6 ++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/css/style.css b/css/style.css index af37b6e6..411564ba 100644 --- a/css/style.css +++ b/css/style.css @@ -601,7 +601,8 @@ input:checked + .switch__wrapper .switch__toggle { } /* Submit button styles */ -.submit-button { +.submit-button, +#disableCloak { background-color: var(--button-color); color: var(--font-color); border: none; @@ -614,7 +615,8 @@ input:checked + .switch__wrapper .switch__toggle { /* Hover effect for the button */ .submit-button:hover, -.save-button:hover { +.save-button:hover, +#disableCloak:hover { background-color: var(--hover-color); } @@ -780,3 +782,10 @@ button.in-game-button[attr-snapped='true'] img { opacity: 0.9; } } + +#disableCloak { + border-radius: 10px; + font-size: 1.5rem; + font-weight: 600; + font-family: var(--font-family); +} \ No newline at end of file diff --git a/index.html b/index.html index 58d974ef..b8b95bdc 100644 --- a/index.html +++ b/index.html @@ -76,8 +76,9 @@
This feature has been disabled by whoever is hosting this MonkeyGG2 instance.
-

Press Anywhere to cloak

-

(If you want to stop seeing this enable popups)

+

Press Anywhere to cloak

+

(If you want to stop seeing this enable popups)

+ Click here if cloak isn't working
diff --git a/js/index.js b/js/index.js index c5bae804..f0a27f9b 100644 --- a/js/index.js +++ b/js/index.js @@ -769,6 +769,12 @@ if (preferences.cloak && window.location.href == window.top.location.href) { }); currentMenu = $('.cloaklaunch'); document.addEventListener('click', (event) => { + if (event.target.id == 'disableCloak') { + $('.cloaklaunch').fadeOut(200); + setTimeout(returnHome, 200); + return; + } + if (event.target.className != 'cloaklaunch' && event.target.className != 'cloaker') return; event.preventDefault(); makecloak(); });