Use document.body when wrapping it in a jquery object

This commit is contained in:
Pavel Djundik 2018-02-23 21:22:05 +02:00
parent 5bac385a75
commit bd2907c13f
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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?";
};