Only confirm exit in public mode
This commit is contained in:
parent
9b03be22b2
commit
07a509a862
@ -313,7 +313,7 @@ $(function() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("topic", function(data) {
|
socket.on("topic", function(data) {
|
||||||
$("#chan-" + data.chan).find(".header .topic").html(data.topic);
|
$("#chan-" + data.chan).find(".header .topic").html(data.topic);
|
||||||
});
|
});
|
||||||
@ -480,13 +480,13 @@ $(function() {
|
|||||||
.find(".chat")
|
.find(".chat")
|
||||||
.sticky()
|
.sticky()
|
||||||
.end();
|
.end();
|
||||||
|
|
||||||
var title = "Shout";
|
var title = "Shout";
|
||||||
if (chan.data("title")) {
|
if (chan.data("title")) {
|
||||||
title = chan.data("title") + " — " + title;
|
title = chan.data("title") + " — " + title;
|
||||||
}
|
}
|
||||||
document.title = title;
|
document.title = title;
|
||||||
|
|
||||||
if (self.hasClass("chan")) {
|
if (self.hasClass("chan")) {
|
||||||
var nick = self
|
var nick = self
|
||||||
.closest(".network")
|
.closest(".network")
|
||||||
@ -695,7 +695,7 @@ $(function() {
|
|||||||
event, values
|
event, values
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
forms.on("input", ".nick", function() {
|
forms.on("input", ".nick", function() {
|
||||||
var nick = $(this).val();
|
var nick = $(this).val();
|
||||||
forms.find(".username").val(nick);
|
forms.find(".username").val(nick);
|
||||||
@ -775,9 +775,11 @@ $(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function confirmExit() {
|
function confirmExit() {
|
||||||
window.onbeforeunload = function() {
|
if ($("body").hasClass("public")) {
|
||||||
return "Are you sure you want to navigate away from this page?";
|
window.onbeforeunload = function() {
|
||||||
};
|
return "Are you sure you want to navigate away from this page?";
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* This is just an example theme and does not
|
* This is just an empty theme.
|
||||||
* contain anything.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
Loading…
Reference in New Issue
Block a user