added option to use website without cloaking to support more devices

This commit is contained in:
Sid Alapati
2024-10-29 19:40:43 -04:00
committed by avsc-sid
parent de2988a18f
commit 14b61b4351
3 changed files with 20 additions and 4 deletions
+11 -2
View File
@@ -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);
}
+3 -2
View File
@@ -76,8 +76,9 @@
<div>This feature has been disabled by whoever is hosting this MonkeyGG2 instance.</div>
</dialog>
<div class="cloaklaunch">
<h1>Press Anywhere to cloak</h1>
<h3>(If you want to stop seeing this enable popups)</h3>
<h1 class="cloaker">Press Anywhere to cloak</h1>
<h3 class="cloaker">(If you want to stop seeing this enable popups)</h3>
<span id="disableCloak">Click here if cloak isn't working</button>
</div>
<div class="homepage">
<div class="card-row">
+6
View File
@@ -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();
});