mirror of
https://github.com/zulip/zulip.git
synced 2025-11-18 12:54:58 +00:00
Tweak desktop app JS to support Cocoa WebScript
(imported from commit 6b0c3442f92cffedbd210530479a13d4af5ea266)
This commit is contained in:
@@ -182,7 +182,7 @@ function process_desktop_notification(message) {
|
||||
notification_object.show();
|
||||
} else {
|
||||
// Shunt the message along to the desktop client
|
||||
window.bridge.desktopNotification({title: title, content: content});
|
||||
window.bridge.desktopNotification(title, content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,6 +232,14 @@ exports.received_messages = function (messages) {
|
||||
});
|
||||
};
|
||||
|
||||
$(function () {
|
||||
// Shim for Cocoa WebScript exporting top-level JS
|
||||
// objects instead of window.foo objects
|
||||
if (typeof(bridge) !== 'undefined' && window.bridge === undefined) {
|
||||
window.bridge = bridge;
|
||||
}
|
||||
});
|
||||
|
||||
return exports;
|
||||
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user