Merge pull request #2110 from thelounge/xpaw/body

Use document.body when wrapping it in a jquery object
This commit is contained in:
Jérémie Astori 2018-02-23 19:06:46 -05:00 committed by GitHub
commit c490091346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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