mirror of https://github.com/zulip/zulip.git
app: Prepare JS files for consumption by webpack.
This commit prepares the frontend code to be consumed by webpack. It is a hack: In theory, modules should be declaring and importing the modules they depend on and the globals they expose directly. However, that requires significant per-module work, which we don't really want to block moving our toolchain to webpack on. So we expose the modules by setting window.varName = varName; as needed in the js files.
This commit is contained in:
parent
b10822efcf
commit
6d255efe4c
|
@ -496,3 +496,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = activity;
|
||||
}
|
||||
window.activity = activity;
|
||||
|
|
|
@ -130,3 +130,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = admin;
|
||||
}
|
||||
window.admin = admin;
|
||||
|
|
|
@ -99,3 +99,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = admin_sections;
|
||||
}
|
||||
window.admin_sections = admin_sections;
|
||||
|
|
|
@ -62,3 +62,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = alert_words;
|
||||
}
|
||||
window.alert_words = alert_words;
|
||||
|
|
|
@ -109,3 +109,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = alert_words_ui;
|
||||
}
|
||||
window.alert_words_ui = alert_words_ui;
|
||||
|
|
|
@ -138,3 +138,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = attachments_ui;
|
||||
}
|
||||
window.attachments_ui = attachments_ui;
|
||||
|
|
|
@ -88,3 +88,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = avatar;
|
||||
}
|
||||
window.avatar = avatar;
|
||||
|
|
|
@ -455,3 +455,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = blueslip;
|
||||
}
|
||||
window.blueslip = blueslip;
|
||||
|
|
|
@ -93,3 +93,4 @@ var bot_data = (function () {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = bot_data;
|
||||
}
|
||||
window.bot_data = bot_data;
|
||||
|
|
|
@ -185,3 +185,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = buddy_data;
|
||||
}
|
||||
window.buddy_data = buddy_data;
|
||||
|
|
|
@ -120,3 +120,4 @@ if (typeof module !== 'undefined') {
|
|||
module.exports = buddy_list;
|
||||
}
|
||||
|
||||
window.buddy_list = buddy_list;
|
||||
|
|
|
@ -119,3 +119,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = channel;
|
||||
}
|
||||
window.channel = channel;
|
||||
|
|
|
@ -741,3 +741,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = click_handlers;
|
||||
}
|
||||
window.click_handlers = click_handlers;
|
||||
|
|
|
@ -59,3 +59,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = colorspace;
|
||||
}
|
||||
window.colorspace = colorspace;
|
||||
|
|
|
@ -95,3 +95,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = common;
|
||||
}
|
||||
window.common = common;
|
||||
|
|
|
@ -131,3 +131,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = components;
|
||||
}
|
||||
window.components = components;
|
||||
|
|
|
@ -987,3 +987,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = compose;
|
||||
}
|
||||
window.compose = compose;
|
||||
|
|
|
@ -444,3 +444,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = compose_actions;
|
||||
}
|
||||
window.compose_actions = compose_actions;
|
||||
|
|
|
@ -261,3 +261,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = compose_fade;
|
||||
}
|
||||
window.compose_fade = compose_fade;
|
||||
|
|
|
@ -60,3 +60,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = compose_pm_pill;
|
||||
}
|
||||
window.compose_pm_pill = compose_pm_pill;
|
||||
|
|
|
@ -63,3 +63,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = compose_state;
|
||||
}
|
||||
window.compose_state = compose_state;
|
||||
|
|
|
@ -55,3 +55,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = compose_ui;
|
||||
}
|
||||
window.compose_ui = compose_ui;
|
||||
|
|
|
@ -673,3 +673,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = composebox_typeahead;
|
||||
}
|
||||
window.composebox_typeahead = composebox_typeahead;
|
||||
|
|
|
@ -216,3 +216,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = condense;
|
||||
}
|
||||
window.condense = condense;
|
||||
|
|
|
@ -238,3 +238,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = copy_and_paste;
|
||||
}
|
||||
window.copy_and_paste = copy_and_paste;
|
||||
|
|
|
@ -141,3 +141,4 @@ Dict.prototype = {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = Dict;
|
||||
}
|
||||
window.Dict = Dict;
|
||||
|
|
|
@ -452,3 +452,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = drafts;
|
||||
}
|
||||
window.drafts = drafts;
|
||||
|
|
|
@ -274,3 +274,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = echo;
|
||||
}
|
||||
window.echo = echo;
|
||||
|
|
|
@ -164,3 +164,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = emoji;
|
||||
}
|
||||
window.emoji = emoji;
|
||||
|
|
|
@ -736,3 +736,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = emoji_picker;
|
||||
}
|
||||
window.emoji_picker = emoji_picker;
|
||||
|
|
|
@ -33,3 +33,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = favicon;
|
||||
}
|
||||
window.favicon = favicon;
|
||||
|
|
|
@ -22,3 +22,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = feature_flags;
|
||||
}
|
||||
window.feature_flags = feature_flags;
|
||||
|
|
|
@ -195,3 +195,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = fenced_code;
|
||||
}
|
||||
window.fenced_code = fenced_code;
|
||||
|
|
|
@ -55,3 +55,4 @@ var FetchStatus = function () {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = FetchStatus;
|
||||
}
|
||||
window.FetchStatus = FetchStatus;
|
||||
|
|
|
@ -652,3 +652,5 @@ return Filter;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = Filter;
|
||||
}
|
||||
|
||||
window.Filter = Filter;
|
||||
|
|
|
@ -111,3 +111,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = floating_recipient_bar;
|
||||
}
|
||||
window.floating_recipient_bar = floating_recipient_bar;
|
||||
|
|
|
@ -67,3 +67,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = gear_menu;
|
||||
}
|
||||
window.gear_menu = gear_menu;
|
||||
|
|
|
@ -61,3 +61,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = hash_util;
|
||||
}
|
||||
window.hash_util = hash_util;
|
||||
|
|
|
@ -324,3 +324,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = hashchange;
|
||||
}
|
||||
window.hashchange = hashchange;
|
||||
|
|
|
@ -789,3 +789,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = hotkeys;
|
||||
}
|
||||
window.hotkey = hotkeys;
|
||||
|
|
|
@ -244,3 +244,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = hotspots;
|
||||
}
|
||||
window.hotspots = hotspots;
|
||||
|
|
|
@ -108,3 +108,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = info_overlay;
|
||||
}
|
||||
window.info_overlay = info_overlay;
|
||||
|
|
|
@ -429,3 +429,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = input_pill;
|
||||
}
|
||||
window.input_pill = input_pill;
|
||||
|
|
|
@ -81,3 +81,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = integration_bot_widget;
|
||||
}
|
||||
window.integration_bot_widget = integration_bot_widget;
|
||||
|
|
|
@ -157,3 +157,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = invite;
|
||||
}
|
||||
window.invite = invite;
|
||||
|
|
|
@ -43,3 +43,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = keydown_util;
|
||||
}
|
||||
window.keydown_util = keydown_util;
|
||||
|
|
|
@ -300,3 +300,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = lightbox;
|
||||
}
|
||||
window.lightbox = lightbox;
|
||||
|
|
|
@ -333,3 +333,4 @@ var LightboxCanvas = (function () {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = LightboxCanvas;
|
||||
}
|
||||
window.lightbox_canvas = LightboxCanvas;
|
||||
|
|
|
@ -138,3 +138,4 @@ var list_cursor = function (opts) {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = list_cursor;
|
||||
}
|
||||
window.list_cursor = list_cursor;
|
||||
|
|
|
@ -392,3 +392,5 @@ var list_render = (function () {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = list_render;
|
||||
}
|
||||
|
||||
window.list_render = list_render;
|
||||
|
|
|
@ -27,3 +27,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = list_util;
|
||||
}
|
||||
window.list_util = list_util;
|
||||
|
|
|
@ -72,3 +72,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = loading;
|
||||
}
|
||||
window.loading = loading;
|
||||
|
|
|
@ -63,3 +63,5 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = local_message;
|
||||
}
|
||||
|
||||
window.local_message = local_message;
|
||||
|
|
|
@ -182,3 +182,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = localstorage;
|
||||
}
|
||||
window.localstorage = localstorage;
|
||||
|
|
|
@ -432,3 +432,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = markdown;
|
||||
}
|
||||
window.markdown = markdown;
|
||||
|
|
|
@ -594,3 +594,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_edit;
|
||||
}
|
||||
window.message_edit = message_edit;
|
||||
|
|
|
@ -291,3 +291,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_events;
|
||||
}
|
||||
window.message_events = message_events;
|
||||
|
|
|
@ -348,3 +348,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_fetch;
|
||||
}
|
||||
window.message_fetch = message_fetch;
|
||||
|
|
|
@ -104,3 +104,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_flags;
|
||||
}
|
||||
window.message_flags = message_flags;
|
||||
|
|
|
@ -438,3 +438,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_list;
|
||||
}
|
||||
window.message_list = message_list;
|
||||
|
|
|
@ -571,3 +571,5 @@ MessageListData.prototype = {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = MessageListData;
|
||||
}
|
||||
|
||||
window.MessageListData = MessageListData;
|
||||
|
|
|
@ -1035,3 +1035,4 @@ MessageListView.prototype = {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = MessageListView;
|
||||
}
|
||||
window.MessageListView = MessageListView;
|
||||
|
|
|
@ -39,3 +39,4 @@ if (typeof module !== 'undefined') {
|
|||
module.exports = message_live_update;
|
||||
}
|
||||
|
||||
window.message_live_update = message_live_update;
|
||||
|
|
|
@ -86,3 +86,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_scroll;
|
||||
}
|
||||
window.message_scroll = message_scroll;
|
||||
|
|
|
@ -192,3 +192,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_store;
|
||||
}
|
||||
window.message_store = message_store;
|
||||
|
|
|
@ -28,3 +28,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_util;
|
||||
}
|
||||
window.message_util = message_util;
|
||||
|
|
|
@ -413,3 +413,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = message_viewport;
|
||||
}
|
||||
window.message_viewport = message_viewport;
|
||||
|
|
|
@ -54,3 +54,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = muting;
|
||||
}
|
||||
window.muting = muting;
|
||||
|
|
|
@ -194,3 +194,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = muting_ui;
|
||||
}
|
||||
window.muting_ui = muting_ui;
|
||||
|
|
|
@ -820,3 +820,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = narrow;
|
||||
}
|
||||
window.narrow = narrow;
|
||||
|
|
|
@ -361,3 +361,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = narrow_state;
|
||||
}
|
||||
window.narrow_state = narrow_state;
|
||||
|
|
|
@ -146,3 +146,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = navigate;
|
||||
}
|
||||
window.navigate = navigate;
|
||||
|
|
|
@ -98,3 +98,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = night_mode;
|
||||
}
|
||||
window.night_mode = night_mode;
|
||||
|
|
|
@ -642,3 +642,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = notifications;
|
||||
}
|
||||
window.notifications = notifications;
|
||||
|
|
|
@ -218,3 +218,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = overlays;
|
||||
}
|
||||
window.overlays = overlays;
|
||||
|
|
|
@ -95,3 +95,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = panels;
|
||||
}
|
||||
window.panels = panels;
|
||||
|
|
|
@ -931,3 +931,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = people;
|
||||
}
|
||||
window.people = people;
|
||||
|
|
|
@ -66,3 +66,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = pm_conversations;
|
||||
}
|
||||
window.pm_conversations = pm_conversations;
|
||||
|
|
|
@ -218,3 +218,4 @@ if (typeof module !== 'undefined') {
|
|||
module.exports = pm_list;
|
||||
}
|
||||
|
||||
window.pm_list = pm_list;
|
||||
|
|
|
@ -122,3 +122,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = pointer;
|
||||
}
|
||||
window.pointer = pointer;
|
||||
|
|
|
@ -1003,3 +1003,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = popovers;
|
||||
}
|
||||
window.popovers = popovers;
|
||||
|
|
|
@ -179,3 +179,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = presence;
|
||||
}
|
||||
window.presence = presence;
|
||||
|
|
|
@ -434,3 +434,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = reactions;
|
||||
}
|
||||
window.reactions = reactions;
|
||||
|
|
|
@ -49,3 +49,4 @@ var realm_icon = (function () {
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = realm_icon;
|
||||
}
|
||||
window.realm_icon = realm_icon;
|
||||
|
|
|
@ -70,3 +70,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = recent_senders;
|
||||
}
|
||||
window.recent_senders = recent_senders;
|
||||
|
|
|
@ -325,3 +325,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = reload;
|
||||
}
|
||||
window.reload = reload;
|
||||
|
|
|
@ -162,3 +162,5 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = reminder;
|
||||
}
|
||||
|
||||
window.reminder = reminder;
|
||||
|
|
|
@ -297,3 +297,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = resize;
|
||||
}
|
||||
window.resize = resize;
|
||||
|
|
|
@ -114,3 +114,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = rows;
|
||||
}
|
||||
window.rows = rows;
|
||||
|
|
|
@ -117,3 +117,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = rtl;
|
||||
}
|
||||
window.rtl = rtl;
|
||||
|
|
|
@ -63,3 +63,5 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = schema;
|
||||
}
|
||||
|
||||
window.schema = schema;
|
||||
|
|
|
@ -66,3 +66,5 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = scroll_bar;
|
||||
}
|
||||
|
||||
window.scroll_bar = scroll_bar;
|
||||
|
|
|
@ -57,3 +57,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = scroll_util;
|
||||
}
|
||||
window.scroll_util = scroll_util;
|
||||
|
|
|
@ -169,3 +169,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = search;
|
||||
}
|
||||
window.search = search;
|
||||
|
|
|
@ -42,3 +42,5 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = search_pill;
|
||||
}
|
||||
|
||||
window.search_pill = search_pill;
|
||||
|
|
|
@ -658,3 +658,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = search_suggestion;
|
||||
}
|
||||
window.search_suggestion = search_suggestion;
|
||||
|
|
|
@ -182,3 +182,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = sent_messages;
|
||||
}
|
||||
window.sent_messages = sent_messages;
|
||||
|
|
|
@ -296,3 +296,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = server_events;
|
||||
}
|
||||
window.server_events = server_events;
|
||||
|
|
|
@ -444,3 +444,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = server_events_dispatch;
|
||||
}
|
||||
window.server_events_dispatch = server_events_dispatch;
|
||||
|
|
|
@ -175,3 +175,4 @@ return exports;
|
|||
if (typeof module !== 'undefined') {
|
||||
module.exports = settings;
|
||||
}
|
||||
window.settings = settings;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue