mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
drafts.js: Create initialize() function.
This commit is contained in:
@@ -383,14 +383,13 @@ exports.launch = function () {
|
||||
});
|
||||
};
|
||||
|
||||
$(function () {
|
||||
|
||||
exports.initialize = function () {
|
||||
window.addEventListener("beforeunload", function () {
|
||||
exports.update_draft();
|
||||
});
|
||||
|
||||
$("#new_message_content").focusout(exports.update_draft);
|
||||
});
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user