Merge pull request #2110 from thelounge/xpaw/body
Use document.body when wrapping it in a jquery object
This commit is contained in:
commit
c490091346
@ -613,7 +613,7 @@ $(function() {
|
|||||||
container.html(templates.user_filtered({matches: result})).show();
|
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() {
|
$("#connect").one("show", function() {
|
||||||
const params = URI(document.location.search).search(true);
|
const params = URI(document.location.search).search(true);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ socket.on("init", function(data) {
|
|||||||
|
|
||||||
webpush.configurePushNotifications(data.pushSubscription, data.applicationServerKey);
|
webpush.configurePushNotifications(data.pushSubscription, data.applicationServerKey);
|
||||||
|
|
||||||
$("body").removeClass("signed-out");
|
$(document.body).removeClass("signed-out");
|
||||||
$("#loading").remove();
|
$("#loading").remove();
|
||||||
$("#sign-in").remove();
|
$("#sign-in").remove();
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ function toggleNotificationMarkers(newState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function confirmExit() {
|
function confirmExit() {
|
||||||
if ($("body").hasClass("public")) {
|
if ($(document.body).hasClass("public")) {
|
||||||
window.onbeforeunload = function() {
|
window.onbeforeunload = function() {
|
||||||
return "Are you sure you want to navigate away from this page?";
|
return "Are you sure you want to navigate away from this page?";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user