diff --git a/client/js/lounge.js b/client/js/lounge.js index 439ba567..80d59cdf 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -613,7 +613,7 @@ $(function() { container.html(templates.user_filtered({matches: result})).show(); }); - if ($("body").hasClass("public") && (window.location.hash === "#connect" || window.location.hash === "")) { + if ($(document.body).hasClass("public") && (window.location.hash === "#connect" || window.location.hash === "")) { $("#connect").one("show", function() { const params = URI(document.location.search).search(true); diff --git a/client/js/socket-events/init.js b/client/js/socket-events/init.js index f2cd9fc1..62db7565 100644 --- a/client/js/socket-events/init.js +++ b/client/js/socket-events/init.js @@ -41,7 +41,7 @@ socket.on("init", function(data) { webpush.configurePushNotifications(data.pushSubscription, data.applicationServerKey); - $("body").removeClass("signed-out"); + $(document.body).removeClass("signed-out"); $("#loading").remove(); $("#sign-in").remove(); diff --git a/client/js/utils.js b/client/js/utils.js index 666e239c..ea1574a5 100644 --- a/client/js/utils.js +++ b/client/js/utils.js @@ -109,7 +109,7 @@ function toggleNotificationMarkers(newState) { } function confirmExit() { - if ($("body").hasClass("public")) { + if ($(document.body).hasClass("public")) { window.onbeforeunload = function() { return "Are you sure you want to navigate away from this page?"; };