From 6d255efe4c7026f664c0e2965114bd5547558fc9 Mon Sep 17 00:00:00 2001 From: Armaan Ahluwalia Date: Mon, 28 May 2018 11:34:36 +0530 Subject: [PATCH] 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. --- static/js/activity.js | 1 + static/js/admin.js | 1 + static/js/admin_sections.js | 1 + static/js/alert_words.js | 1 + static/js/alert_words_ui.js | 1 + static/js/attachments_ui.js | 1 + static/js/avatar.js | 1 + static/js/blueslip.js | 1 + static/js/bot_data.js | 1 + static/js/buddy_data.js | 1 + static/js/buddy_list.js | 1 + static/js/channel.js | 1 + static/js/click_handlers.js | 1 + static/js/colorspace.js | 1 + static/js/common.js | 1 + static/js/components.js | 1 + static/js/compose.js | 1 + static/js/compose_actions.js | 1 + static/js/compose_fade.js | 1 + static/js/compose_pm_pill.js | 1 + static/js/compose_state.js | 1 + static/js/compose_ui.js | 1 + static/js/composebox_typeahead.js | 1 + static/js/condense.js | 1 + static/js/copy_and_paste.js | 1 + static/js/dict.js | 1 + static/js/drafts.js | 1 + static/js/echo.js | 1 + static/js/emoji.js | 1 + static/js/emoji_picker.js | 1 + static/js/favicon.js | 1 + static/js/feature_flags.js | 1 + static/js/fenced_code.js | 1 + static/js/fetch_status.js | 1 + static/js/filter.js | 2 ++ static/js/floating_recipient_bar.js | 1 + static/js/gear_menu.js | 1 + static/js/hash_util.js | 1 + static/js/hashchange.js | 1 + static/js/hotkey.js | 1 + static/js/hotspots.js | 1 + static/js/info_overlay.js | 1 + static/js/input_pill.js | 1 + static/js/integration_bot_widget.js | 1 + static/js/invite.js | 1 + static/js/keydown_util.js | 1 + static/js/lightbox.js | 1 + static/js/lightbox_canvas.js | 1 + static/js/list_cursor.js | 1 + static/js/list_render.js | 2 ++ static/js/list_util.js | 1 + static/js/loading.js | 1 + static/js/local_message.js | 2 ++ static/js/localstorage.js | 1 + static/js/markdown.js | 1 + static/js/message_edit.js | 1 + static/js/message_events.js | 1 + static/js/message_fetch.js | 1 + static/js/message_flags.js | 1 + static/js/message_list.js | 1 + static/js/message_list_data.js | 2 ++ static/js/message_list_view.js | 1 + static/js/message_live_update.js | 1 + static/js/message_scroll.js | 1 + static/js/message_store.js | 1 + static/js/message_util.js | 1 + static/js/message_viewport.js | 1 + static/js/muting.js | 1 + static/js/muting_ui.js | 1 + static/js/narrow.js | 1 + static/js/narrow_state.js | 1 + static/js/navigate.js | 1 + static/js/night_mode.js | 1 + static/js/notifications.js | 1 + static/js/overlays.js | 1 + static/js/panels.js | 1 + static/js/people.js | 1 + static/js/pm_conversations.js | 1 + static/js/pm_list.js | 1 + static/js/pointer.js | 1 + static/js/popovers.js | 1 + static/js/presence.js | 1 + static/js/reactions.js | 1 + static/js/realm_icon.js | 1 + static/js/recent_senders.js | 1 + static/js/reload.js | 1 + static/js/reminder.js | 2 ++ static/js/resize.js | 1 + static/js/rows.js | 1 + static/js/rtl.js | 1 + static/js/schema.js | 2 ++ static/js/scroll_bar.js | 2 ++ static/js/scroll_util.js | 1 + static/js/search.js | 1 + static/js/search_pill.js | 2 ++ static/js/search_suggestion.js | 1 + static/js/sent_messages.js | 1 + static/js/server_events.js | 1 + static/js/server_events_dispatch.js | 1 + static/js/settings.js | 1 + static/js/settings_account.js | 1 + static/js/settings_bots.js | 1 + static/js/settings_display.js | 1 + static/js/settings_emoji.js | 1 + static/js/settings_filters.js | 1 + static/js/settings_invites.js | 1 + static/js/settings_muting.js | 1 + static/js/settings_notifications.js | 1 + static/js/settings_org.js | 1 + static/js/settings_panel_menu.js | 2 ++ static/js/settings_profile_fields.js | 1 + static/js/settings_sections.js | 1 + static/js/settings_streams.js | 1 + static/js/settings_toggle.js | 1 + static/js/settings_ui.js | 1 + static/js/settings_user_groups.js | 1 + static/js/settings_users.js | 1 + static/js/setup.js | 2 +- static/js/socket.js | 1 + static/js/stream_color.js | 1 + static/js/stream_create.js | 1 + static/js/stream_data.js | 1 + static/js/stream_edit.js | 1 + static/js/stream_events.js | 1 + static/js/stream_list.js | 1 + static/js/stream_muting.js | 1 + static/js/stream_popover.js | 1 + static/js/stream_sort.js | 1 + static/js/submessage.js | 2 ++ static/js/subs.js | 1 + static/js/tab_bar.js | 1 + static/js/templates.js | 1 + static/js/tictactoe_widget.js | 2 ++ static/js/timerender.js | 1 + static/js/top_left_corner.js | 1 + static/js/topic_data.js | 1 + static/js/topic_generator.js | 1 + static/js/topic_list.js | 1 + static/js/transmit.js | 1 + static/js/tutorial.js | 1 + static/js/typeahead_helper.js | 1 + static/js/typing.js | 1 + static/js/typing_data.js | 1 + static/js/typing_events.js | 1 + static/js/typing_status.js | 1 + static/js/ui.js | 1 + static/js/ui_report.js | 1 + static/js/ui_util.js | 1 + static/js/unread.js | 1 + static/js/unread_ops.js | 1 + static/js/unread_ui.js | 1 + static/js/upload.js | 1 + static/js/upload_widget.js | 1 + static/js/user_events.js | 1 + static/js/user_groups.js | 1 + static/js/user_pill.js | 1 + static/js/user_search.js | 1 + static/js/util.js | 1 + static/js/voting_widget.js | 2 ++ static/js/widgetize.js | 2 ++ static/js/zcommand.js | 2 ++ static/js/zform.js | 2 ++ static/js/zulip.js | 3 +++ 163 files changed, 180 insertions(+), 1 deletion(-) diff --git a/static/js/activity.js b/static/js/activity.js index 4b3c0c93f4273..bd1e19a258d65 100644 --- a/static/js/activity.js +++ b/static/js/activity.js @@ -496,3 +496,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = activity; } +window.activity = activity; diff --git a/static/js/admin.js b/static/js/admin.js index 7d33f983a905c..f1f36ac01e9d3 100644 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -130,3 +130,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = admin; } +window.admin = admin; diff --git a/static/js/admin_sections.js b/static/js/admin_sections.js index f2c9c8c91483f..b417185e3aa12 100644 --- a/static/js/admin_sections.js +++ b/static/js/admin_sections.js @@ -99,3 +99,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = admin_sections; } +window.admin_sections = admin_sections; diff --git a/static/js/alert_words.js b/static/js/alert_words.js index 3c5025472e5ca..67960e63c2713 100644 --- a/static/js/alert_words.js +++ b/static/js/alert_words.js @@ -62,3 +62,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = alert_words; } +window.alert_words = alert_words; diff --git a/static/js/alert_words_ui.js b/static/js/alert_words_ui.js index 2b88a5cc13977..0446bb34f05a5 100644 --- a/static/js/alert_words_ui.js +++ b/static/js/alert_words_ui.js @@ -109,3 +109,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = alert_words_ui; } +window.alert_words_ui = alert_words_ui; diff --git a/static/js/attachments_ui.js b/static/js/attachments_ui.js index 7ad8c59aa955b..ee28f896aca8c 100644 --- a/static/js/attachments_ui.js +++ b/static/js/attachments_ui.js @@ -138,3 +138,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = attachments_ui; } +window.attachments_ui = attachments_ui; diff --git a/static/js/avatar.js b/static/js/avatar.js index 5bbf941c9b7d9..11d865950b887 100644 --- a/static/js/avatar.js +++ b/static/js/avatar.js @@ -88,3 +88,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = avatar; } +window.avatar = avatar; diff --git a/static/js/blueslip.js b/static/js/blueslip.js index 6b44302b9cc90..b55d09db07b2b 100644 --- a/static/js/blueslip.js +++ b/static/js/blueslip.js @@ -455,3 +455,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = blueslip; } +window.blueslip = blueslip; diff --git a/static/js/bot_data.js b/static/js/bot_data.js index ceff9cef672e1..3bb5ce4c22911 100644 --- a/static/js/bot_data.js +++ b/static/js/bot_data.js @@ -93,3 +93,4 @@ var bot_data = (function () { if (typeof module !== 'undefined') { module.exports = bot_data; } +window.bot_data = bot_data; diff --git a/static/js/buddy_data.js b/static/js/buddy_data.js index b75995d1fb08a..e9e9b22554b7e 100644 --- a/static/js/buddy_data.js +++ b/static/js/buddy_data.js @@ -185,3 +185,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = buddy_data; } +window.buddy_data = buddy_data; diff --git a/static/js/buddy_list.js b/static/js/buddy_list.js index e28b86e6ce6ec..214ce2454e964 100644 --- a/static/js/buddy_list.js +++ b/static/js/buddy_list.js @@ -120,3 +120,4 @@ if (typeof module !== 'undefined') { module.exports = buddy_list; } +window.buddy_list = buddy_list; diff --git a/static/js/channel.js b/static/js/channel.js index af4fe236e425e..5eb41dc81e799 100644 --- a/static/js/channel.js +++ b/static/js/channel.js @@ -119,3 +119,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = channel; } +window.channel = channel; diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index b56a1cd3a35ab..f62332d0e14ee 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -741,3 +741,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = click_handlers; } +window.click_handlers = click_handlers; diff --git a/static/js/colorspace.js b/static/js/colorspace.js index fc538388bae0d..dac068be396ab 100644 --- a/static/js/colorspace.js +++ b/static/js/colorspace.js @@ -59,3 +59,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = colorspace; } +window.colorspace = colorspace; diff --git a/static/js/common.js b/static/js/common.js index 1c135a5052ced..950e6bbd0e09a 100644 --- a/static/js/common.js +++ b/static/js/common.js @@ -95,3 +95,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = common; } +window.common = common; diff --git a/static/js/components.js b/static/js/components.js index 4e1db4d8e0a3b..aeef10f27c3c6 100644 --- a/static/js/components.js +++ b/static/js/components.js @@ -131,3 +131,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = components; } +window.components = components; diff --git a/static/js/compose.js b/static/js/compose.js index bd51bd4ead04c..a98f7f0b3bbab 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -987,3 +987,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = compose; } +window.compose = compose; diff --git a/static/js/compose_actions.js b/static/js/compose_actions.js index a7ecb0d519eff..0049e88bedecc 100644 --- a/static/js/compose_actions.js +++ b/static/js/compose_actions.js @@ -444,3 +444,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = compose_actions; } +window.compose_actions = compose_actions; diff --git a/static/js/compose_fade.js b/static/js/compose_fade.js index d4bd3847111c9..33cddf69a8ec3 100644 --- a/static/js/compose_fade.js +++ b/static/js/compose_fade.js @@ -261,3 +261,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = compose_fade; } +window.compose_fade = compose_fade; diff --git a/static/js/compose_pm_pill.js b/static/js/compose_pm_pill.js index 1187f7679537d..26d0eac09736e 100644 --- a/static/js/compose_pm_pill.js +++ b/static/js/compose_pm_pill.js @@ -60,3 +60,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = compose_pm_pill; } +window.compose_pm_pill = compose_pm_pill; diff --git a/static/js/compose_state.js b/static/js/compose_state.js index b44e2349150b7..60fa683a1c6cc 100644 --- a/static/js/compose_state.js +++ b/static/js/compose_state.js @@ -63,3 +63,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = compose_state; } +window.compose_state = compose_state; diff --git a/static/js/compose_ui.js b/static/js/compose_ui.js index f1511e06f6e8c..b423131d5890a 100644 --- a/static/js/compose_ui.js +++ b/static/js/compose_ui.js @@ -55,3 +55,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = compose_ui; } +window.compose_ui = compose_ui; diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.js index 12fc234929dbb..aa510db197444 100644 --- a/static/js/composebox_typeahead.js +++ b/static/js/composebox_typeahead.js @@ -673,3 +673,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = composebox_typeahead; } +window.composebox_typeahead = composebox_typeahead; diff --git a/static/js/condense.js b/static/js/condense.js index ad0741d4863aa..1032641737240 100644 --- a/static/js/condense.js +++ b/static/js/condense.js @@ -216,3 +216,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = condense; } +window.condense = condense; diff --git a/static/js/copy_and_paste.js b/static/js/copy_and_paste.js index a302d09f075d0..807eebf875aa8 100644 --- a/static/js/copy_and_paste.js +++ b/static/js/copy_and_paste.js @@ -238,3 +238,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = copy_and_paste; } +window.copy_and_paste = copy_and_paste; diff --git a/static/js/dict.js b/static/js/dict.js index efb5d2fe6fec9..698d8256c6bd5 100644 --- a/static/js/dict.js +++ b/static/js/dict.js @@ -141,3 +141,4 @@ Dict.prototype = { if (typeof module !== 'undefined') { module.exports = Dict; } +window.Dict = Dict; diff --git a/static/js/drafts.js b/static/js/drafts.js index 5786ab4232d28..757c74740b306 100644 --- a/static/js/drafts.js +++ b/static/js/drafts.js @@ -452,3 +452,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = drafts; } +window.drafts = drafts; diff --git a/static/js/echo.js b/static/js/echo.js index 3cf0d41b6eb47..53c18f439ac26 100644 --- a/static/js/echo.js +++ b/static/js/echo.js @@ -274,3 +274,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = echo; } +window.echo = echo; diff --git a/static/js/emoji.js b/static/js/emoji.js index bc216cfd39735..094dee3bd40ad 100644 --- a/static/js/emoji.js +++ b/static/js/emoji.js @@ -164,3 +164,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = emoji; } +window.emoji = emoji; diff --git a/static/js/emoji_picker.js b/static/js/emoji_picker.js index 76ec17e08cb22..58c512a50a5da 100644 --- a/static/js/emoji_picker.js +++ b/static/js/emoji_picker.js @@ -736,3 +736,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = emoji_picker; } +window.emoji_picker = emoji_picker; diff --git a/static/js/favicon.js b/static/js/favicon.js index a48ad38a989d9..c48040bd68944 100644 --- a/static/js/favicon.js +++ b/static/js/favicon.js @@ -33,3 +33,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = favicon; } +window.favicon = favicon; diff --git a/static/js/feature_flags.js b/static/js/feature_flags.js index 87ef094299ec9..9f58a877468e9 100644 --- a/static/js/feature_flags.js +++ b/static/js/feature_flags.js @@ -22,3 +22,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = feature_flags; } +window.feature_flags = feature_flags; diff --git a/static/js/fenced_code.js b/static/js/fenced_code.js index 6c606335f5162..446109fefaf0e 100644 --- a/static/js/fenced_code.js +++ b/static/js/fenced_code.js @@ -195,3 +195,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = fenced_code; } +window.fenced_code = fenced_code; diff --git a/static/js/fetch_status.js b/static/js/fetch_status.js index 82eaf69dd5f81..b15413eecd3d9 100644 --- a/static/js/fetch_status.js +++ b/static/js/fetch_status.js @@ -55,3 +55,4 @@ var FetchStatus = function () { if (typeof module !== 'undefined') { module.exports = FetchStatus; } +window.FetchStatus = FetchStatus; diff --git a/static/js/filter.js b/static/js/filter.js index a339e9288535c..7d82813290a26 100644 --- a/static/js/filter.js +++ b/static/js/filter.js @@ -652,3 +652,5 @@ return Filter; if (typeof module !== 'undefined') { module.exports = Filter; } + +window.Filter = Filter; diff --git a/static/js/floating_recipient_bar.js b/static/js/floating_recipient_bar.js index faa458dd41d6a..1d3cddb08279b 100644 --- a/static/js/floating_recipient_bar.js +++ b/static/js/floating_recipient_bar.js @@ -111,3 +111,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = floating_recipient_bar; } +window.floating_recipient_bar = floating_recipient_bar; diff --git a/static/js/gear_menu.js b/static/js/gear_menu.js index 3b48dee385ab5..9e40c5aca7028 100644 --- a/static/js/gear_menu.js +++ b/static/js/gear_menu.js @@ -67,3 +67,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = gear_menu; } +window.gear_menu = gear_menu; diff --git a/static/js/hash_util.js b/static/js/hash_util.js index be018386e67f2..0912bab4fc2c3 100644 --- a/static/js/hash_util.js +++ b/static/js/hash_util.js @@ -61,3 +61,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = hash_util; } +window.hash_util = hash_util; diff --git a/static/js/hashchange.js b/static/js/hashchange.js index 342775d1b47fb..28bece4793d31 100644 --- a/static/js/hashchange.js +++ b/static/js/hashchange.js @@ -324,3 +324,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = hashchange; } +window.hashchange = hashchange; diff --git a/static/js/hotkey.js b/static/js/hotkey.js index 8e4f5b34b0ac3..d17093b0a533a 100644 --- a/static/js/hotkey.js +++ b/static/js/hotkey.js @@ -789,3 +789,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = hotkeys; } +window.hotkey = hotkeys; diff --git a/static/js/hotspots.js b/static/js/hotspots.js index 93890d8f5c812..de9842e5f7e70 100644 --- a/static/js/hotspots.js +++ b/static/js/hotspots.js @@ -244,3 +244,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = hotspots; } +window.hotspots = hotspots; diff --git a/static/js/info_overlay.js b/static/js/info_overlay.js index 1a7526492cf54..0330b9239177e 100644 --- a/static/js/info_overlay.js +++ b/static/js/info_overlay.js @@ -108,3 +108,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = info_overlay; } +window.info_overlay = info_overlay; diff --git a/static/js/input_pill.js b/static/js/input_pill.js index afa8a4cb441c4..fdb7a620d9f00 100644 --- a/static/js/input_pill.js +++ b/static/js/input_pill.js @@ -429,3 +429,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = input_pill; } +window.input_pill = input_pill; diff --git a/static/js/integration_bot_widget.js b/static/js/integration_bot_widget.js index 5834900b5d624..429350f578655 100644 --- a/static/js/integration_bot_widget.js +++ b/static/js/integration_bot_widget.js @@ -81,3 +81,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = integration_bot_widget; } +window.integration_bot_widget = integration_bot_widget; diff --git a/static/js/invite.js b/static/js/invite.js index c6aaf0f376bad..0991cc776dfd1 100644 --- a/static/js/invite.js +++ b/static/js/invite.js @@ -157,3 +157,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = invite; } +window.invite = invite; diff --git a/static/js/keydown_util.js b/static/js/keydown_util.js index 5ca4081dbeeee..032871a1fbdc6 100644 --- a/static/js/keydown_util.js +++ b/static/js/keydown_util.js @@ -43,3 +43,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = keydown_util; } +window.keydown_util = keydown_util; diff --git a/static/js/lightbox.js b/static/js/lightbox.js index 4a41f705e465f..2bc90cb819949 100644 --- a/static/js/lightbox.js +++ b/static/js/lightbox.js @@ -300,3 +300,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = lightbox; } +window.lightbox = lightbox; diff --git a/static/js/lightbox_canvas.js b/static/js/lightbox_canvas.js index f90fc6d80eec4..01d90d03a28fa 100644 --- a/static/js/lightbox_canvas.js +++ b/static/js/lightbox_canvas.js @@ -333,3 +333,4 @@ var LightboxCanvas = (function () { if (typeof module !== 'undefined') { module.exports = LightboxCanvas; } +window.lightbox_canvas = LightboxCanvas; diff --git a/static/js/list_cursor.js b/static/js/list_cursor.js index ebc04ed9bd07a..3eacb56638638 100644 --- a/static/js/list_cursor.js +++ b/static/js/list_cursor.js @@ -138,3 +138,4 @@ var list_cursor = function (opts) { if (typeof module !== 'undefined') { module.exports = list_cursor; } +window.list_cursor = list_cursor; diff --git a/static/js/list_render.js b/static/js/list_render.js index e61cb97458e75..90fc526e73aee 100644 --- a/static/js/list_render.js +++ b/static/js/list_render.js @@ -392,3 +392,5 @@ var list_render = (function () { if (typeof module !== 'undefined') { module.exports = list_render; } + +window.list_render = list_render; diff --git a/static/js/list_util.js b/static/js/list_util.js index 88edc83366817..83266407f87dd 100644 --- a/static/js/list_util.js +++ b/static/js/list_util.js @@ -27,3 +27,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = list_util; } +window.list_util = list_util; diff --git a/static/js/loading.js b/static/js/loading.js index b2cd400b9a58c..cec2132bd4982 100644 --- a/static/js/loading.js +++ b/static/js/loading.js @@ -72,3 +72,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = loading; } +window.loading = loading; diff --git a/static/js/local_message.js b/static/js/local_message.js index a7da6c2bc1b0b..423e732bfaefb 100644 --- a/static/js/local_message.js +++ b/static/js/local_message.js @@ -63,3 +63,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = local_message; } + +window.local_message = local_message; diff --git a/static/js/localstorage.js b/static/js/localstorage.js index 1bea82f21b6d9..662944543e390 100644 --- a/static/js/localstorage.js +++ b/static/js/localstorage.js @@ -182,3 +182,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = localstorage; } +window.localstorage = localstorage; diff --git a/static/js/markdown.js b/static/js/markdown.js index 2acb6c2af29e4..8c35cb1352ed2 100644 --- a/static/js/markdown.js +++ b/static/js/markdown.js @@ -432,3 +432,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = markdown; } +window.markdown = markdown; diff --git a/static/js/message_edit.js b/static/js/message_edit.js index 25a7bdb057e16..267a95d1c1915 100644 --- a/static/js/message_edit.js +++ b/static/js/message_edit.js @@ -594,3 +594,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_edit; } +window.message_edit = message_edit; diff --git a/static/js/message_events.js b/static/js/message_events.js index f80a38bb443f2..66f7afb627ee7 100644 --- a/static/js/message_events.js +++ b/static/js/message_events.js @@ -291,3 +291,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_events; } +window.message_events = message_events; diff --git a/static/js/message_fetch.js b/static/js/message_fetch.js index 2110c30990f81..f9406faddc882 100644 --- a/static/js/message_fetch.js +++ b/static/js/message_fetch.js @@ -348,3 +348,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_fetch; } +window.message_fetch = message_fetch; diff --git a/static/js/message_flags.js b/static/js/message_flags.js index 886cf889e2a63..816cbf44dbf8c 100644 --- a/static/js/message_flags.js +++ b/static/js/message_flags.js @@ -104,3 +104,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_flags; } +window.message_flags = message_flags; diff --git a/static/js/message_list.js b/static/js/message_list.js index faa7a965389b2..bce5f2b1fba30 100644 --- a/static/js/message_list.js +++ b/static/js/message_list.js @@ -438,3 +438,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_list; } +window.message_list = message_list; diff --git a/static/js/message_list_data.js b/static/js/message_list_data.js index 73eb7d4cf09d6..932446e16c065 100644 --- a/static/js/message_list_data.js +++ b/static/js/message_list_data.js @@ -571,3 +571,5 @@ MessageListData.prototype = { if (typeof module !== 'undefined') { module.exports = MessageListData; } + +window.MessageListData = MessageListData; diff --git a/static/js/message_list_view.js b/static/js/message_list_view.js index 41f5fd02d0f1c..b37064a36cfa6 100644 --- a/static/js/message_list_view.js +++ b/static/js/message_list_view.js @@ -1035,3 +1035,4 @@ MessageListView.prototype = { if (typeof module !== 'undefined') { module.exports = MessageListView; } +window.MessageListView = MessageListView; diff --git a/static/js/message_live_update.js b/static/js/message_live_update.js index 05330419d5440..69c1e2cf9d1cf 100644 --- a/static/js/message_live_update.js +++ b/static/js/message_live_update.js @@ -39,3 +39,4 @@ if (typeof module !== 'undefined') { module.exports = message_live_update; } +window.message_live_update = message_live_update; diff --git a/static/js/message_scroll.js b/static/js/message_scroll.js index 8fea209c536a7..79cc46c7ce666 100644 --- a/static/js/message_scroll.js +++ b/static/js/message_scroll.js @@ -86,3 +86,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_scroll; } +window.message_scroll = message_scroll; diff --git a/static/js/message_store.js b/static/js/message_store.js index dd1719e95b55f..683dad6fde4be 100644 --- a/static/js/message_store.js +++ b/static/js/message_store.js @@ -192,3 +192,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_store; } +window.message_store = message_store; diff --git a/static/js/message_util.js b/static/js/message_util.js index 97f337466028a..4158f8437a975 100644 --- a/static/js/message_util.js +++ b/static/js/message_util.js @@ -28,3 +28,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_util; } +window.message_util = message_util; diff --git a/static/js/message_viewport.js b/static/js/message_viewport.js index fc931150d50e2..81c0d47eb536b 100644 --- a/static/js/message_viewport.js +++ b/static/js/message_viewport.js @@ -413,3 +413,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = message_viewport; } +window.message_viewport = message_viewport; diff --git a/static/js/muting.js b/static/js/muting.js index 617f302ab520b..b90206847b57d 100644 --- a/static/js/muting.js +++ b/static/js/muting.js @@ -54,3 +54,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = muting; } +window.muting = muting; diff --git a/static/js/muting_ui.js b/static/js/muting_ui.js index 603441e6369d9..3cca9f7f2a245 100644 --- a/static/js/muting_ui.js +++ b/static/js/muting_ui.js @@ -194,3 +194,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = muting_ui; } +window.muting_ui = muting_ui; diff --git a/static/js/narrow.js b/static/js/narrow.js index ac0081a399577..858e4278dad2b 100644 --- a/static/js/narrow.js +++ b/static/js/narrow.js @@ -820,3 +820,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = narrow; } +window.narrow = narrow; diff --git a/static/js/narrow_state.js b/static/js/narrow_state.js index c833e4c9ec7a6..ee09c3c79d730 100644 --- a/static/js/narrow_state.js +++ b/static/js/narrow_state.js @@ -361,3 +361,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = narrow_state; } +window.narrow_state = narrow_state; diff --git a/static/js/navigate.js b/static/js/navigate.js index 0c39cc5577468..90290918ef6a5 100644 --- a/static/js/navigate.js +++ b/static/js/navigate.js @@ -146,3 +146,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = navigate; } +window.navigate = navigate; diff --git a/static/js/night_mode.js b/static/js/night_mode.js index 2cc5d87423a4d..93553143ba658 100644 --- a/static/js/night_mode.js +++ b/static/js/night_mode.js @@ -98,3 +98,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = night_mode; } +window.night_mode = night_mode; diff --git a/static/js/notifications.js b/static/js/notifications.js index f8b35306fb4e8..77f5b21a5e426 100644 --- a/static/js/notifications.js +++ b/static/js/notifications.js @@ -642,3 +642,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = notifications; } +window.notifications = notifications; diff --git a/static/js/overlays.js b/static/js/overlays.js index 9a40554d3df34..a8b162ffc43b7 100644 --- a/static/js/overlays.js +++ b/static/js/overlays.js @@ -218,3 +218,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = overlays; } +window.overlays = overlays; diff --git a/static/js/panels.js b/static/js/panels.js index ba5e51c82812c..2fc7f533e6ed5 100644 --- a/static/js/panels.js +++ b/static/js/panels.js @@ -95,3 +95,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = panels; } +window.panels = panels; diff --git a/static/js/people.js b/static/js/people.js index 9bcee29d3a5cf..9dce575bd02ae 100644 --- a/static/js/people.js +++ b/static/js/people.js @@ -931,3 +931,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = people; } +window.people = people; diff --git a/static/js/pm_conversations.js b/static/js/pm_conversations.js index 24f81cc08381a..82363de82e162 100644 --- a/static/js/pm_conversations.js +++ b/static/js/pm_conversations.js @@ -66,3 +66,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = pm_conversations; } +window.pm_conversations = pm_conversations; diff --git a/static/js/pm_list.js b/static/js/pm_list.js index 7a3161f2c1550..db45979bdb69a 100644 --- a/static/js/pm_list.js +++ b/static/js/pm_list.js @@ -218,3 +218,4 @@ if (typeof module !== 'undefined') { module.exports = pm_list; } +window.pm_list = pm_list; diff --git a/static/js/pointer.js b/static/js/pointer.js index d4b4e5e3414dd..f57e022ef4489 100644 --- a/static/js/pointer.js +++ b/static/js/pointer.js @@ -122,3 +122,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = pointer; } +window.pointer = pointer; diff --git a/static/js/popovers.js b/static/js/popovers.js index da59d3dd4fc51..b3bfee0208e68 100644 --- a/static/js/popovers.js +++ b/static/js/popovers.js @@ -1003,3 +1003,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = popovers; } +window.popovers = popovers; diff --git a/static/js/presence.js b/static/js/presence.js index 4730d348f0e3b..ebe64fe0843a6 100644 --- a/static/js/presence.js +++ b/static/js/presence.js @@ -179,3 +179,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = presence; } +window.presence = presence; diff --git a/static/js/reactions.js b/static/js/reactions.js index ab1d9b0259071..5e6f219a5c992 100644 --- a/static/js/reactions.js +++ b/static/js/reactions.js @@ -434,3 +434,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = reactions; } +window.reactions = reactions; diff --git a/static/js/realm_icon.js b/static/js/realm_icon.js index 9010935c531eb..635bdccf176a2 100644 --- a/static/js/realm_icon.js +++ b/static/js/realm_icon.js @@ -49,3 +49,4 @@ var realm_icon = (function () { if (typeof module !== 'undefined') { module.exports = realm_icon; } +window.realm_icon = realm_icon; diff --git a/static/js/recent_senders.js b/static/js/recent_senders.js index c402e98dbcc9b..3c90955cabaa8 100644 --- a/static/js/recent_senders.js +++ b/static/js/recent_senders.js @@ -70,3 +70,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = recent_senders; } +window.recent_senders = recent_senders; diff --git a/static/js/reload.js b/static/js/reload.js index b13ec1f39ff9d..d8c321edc9c5a 100644 --- a/static/js/reload.js +++ b/static/js/reload.js @@ -325,3 +325,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = reload; } +window.reload = reload; diff --git a/static/js/reminder.js b/static/js/reminder.js index 5fa002e15ae1d..b62029141d95f 100644 --- a/static/js/reminder.js +++ b/static/js/reminder.js @@ -162,3 +162,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = reminder; } + +window.reminder = reminder; diff --git a/static/js/resize.js b/static/js/resize.js index 5a3cbb4356944..44bf85af82728 100644 --- a/static/js/resize.js +++ b/static/js/resize.js @@ -297,3 +297,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = resize; } +window.resize = resize; diff --git a/static/js/rows.js b/static/js/rows.js index 3193273b37f61..35bce15a397d6 100644 --- a/static/js/rows.js +++ b/static/js/rows.js @@ -114,3 +114,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = rows; } +window.rows = rows; diff --git a/static/js/rtl.js b/static/js/rtl.js index f341c2e5a8494..a43517d96f2da 100644 --- a/static/js/rtl.js +++ b/static/js/rtl.js @@ -117,3 +117,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = rtl; } +window.rtl = rtl; diff --git a/static/js/schema.js b/static/js/schema.js index 8c853d3bec67a..a596b43548cb7 100644 --- a/static/js/schema.js +++ b/static/js/schema.js @@ -63,3 +63,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = schema; } + +window.schema = schema; diff --git a/static/js/scroll_bar.js b/static/js/scroll_bar.js index de017b4bfbbef..5f4a3b36cf58c 100644 --- a/static/js/scroll_bar.js +++ b/static/js/scroll_bar.js @@ -66,3 +66,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = scroll_bar; } + +window.scroll_bar = scroll_bar; diff --git a/static/js/scroll_util.js b/static/js/scroll_util.js index c6eddc544d171..c0cded1a8c8fd 100644 --- a/static/js/scroll_util.js +++ b/static/js/scroll_util.js @@ -57,3 +57,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = scroll_util; } +window.scroll_util = scroll_util; diff --git a/static/js/search.js b/static/js/search.js index 417a54e9558fa..ef7265a42f042 100644 --- a/static/js/search.js +++ b/static/js/search.js @@ -169,3 +169,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = search; } +window.search = search; diff --git a/static/js/search_pill.js b/static/js/search_pill.js index 9d5c1b1052f42..2b13cb96f9868 100644 --- a/static/js/search_pill.js +++ b/static/js/search_pill.js @@ -42,3 +42,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = search_pill; } + +window.search_pill = search_pill; diff --git a/static/js/search_suggestion.js b/static/js/search_suggestion.js index 3a20342246175..5893656a188e2 100644 --- a/static/js/search_suggestion.js +++ b/static/js/search_suggestion.js @@ -658,3 +658,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = search_suggestion; } +window.search_suggestion = search_suggestion; diff --git a/static/js/sent_messages.js b/static/js/sent_messages.js index 9fb75ebb90dcb..020d568e3e656 100644 --- a/static/js/sent_messages.js +++ b/static/js/sent_messages.js @@ -182,3 +182,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = sent_messages; } +window.sent_messages = sent_messages; diff --git a/static/js/server_events.js b/static/js/server_events.js index 39f6146f6cd61..f8e66aebb4501 100644 --- a/static/js/server_events.js +++ b/static/js/server_events.js @@ -296,3 +296,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = server_events; } +window.server_events = server_events; diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.js index ae51265e2d56e..70a21cb38f767 100644 --- a/static/js/server_events_dispatch.js +++ b/static/js/server_events_dispatch.js @@ -444,3 +444,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = server_events_dispatch; } +window.server_events_dispatch = server_events_dispatch; diff --git a/static/js/settings.js b/static/js/settings.js index 52299c6d29cfc..8e51033bb70aa 100644 --- a/static/js/settings.js +++ b/static/js/settings.js @@ -175,3 +175,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings; } +window.settings = settings; diff --git a/static/js/settings_account.js b/static/js/settings_account.js index c95eba73002a8..3603d96c57c7c 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -496,3 +496,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_account; } +window.settings_account = settings_account; diff --git a/static/js/settings_bots.js b/static/js/settings_bots.js index ce924b69125e7..be4142b150806 100644 --- a/static/js/settings_bots.js +++ b/static/js/settings_bots.js @@ -513,3 +513,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_bots; } +window.settings_bots = settings_bots; diff --git a/static/js/settings_display.js b/static/js/settings_display.js index 949368bb7bbf2..98212959ec49b 100644 --- a/static/js/settings_display.js +++ b/static/js/settings_display.js @@ -181,3 +181,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_display; } +window.settings_display = settings_display; diff --git a/static/js/settings_emoji.js b/static/js/settings_emoji.js index 6fa610cab8eea..13dfd16b967ad 100644 --- a/static/js/settings_emoji.js +++ b/static/js/settings_emoji.js @@ -146,3 +146,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_emoji; } +window.settings_emoji = settings_emoji; diff --git a/static/js/settings_filters.js b/static/js/settings_filters.js index fedaf6eba1e3b..606950312fc33 100644 --- a/static/js/settings_filters.js +++ b/static/js/settings_filters.js @@ -114,3 +114,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_filters; } +window.settings_filters = settings_filters; diff --git a/static/js/settings_invites.js b/static/js/settings_invites.js index 93823d9eea56a..fba0b150e761e 100644 --- a/static/js/settings_invites.js +++ b/static/js/settings_invites.js @@ -153,3 +153,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_invites; } +window.settings_invites = settings_invites; diff --git a/static/js/settings_muting.js b/static/js/settings_muting.js index ba3e0e8e22423..965d3e90777a5 100644 --- a/static/js/settings_muting.js +++ b/static/js/settings_muting.js @@ -22,3 +22,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_muting; } +window.settings_muting = settings_muting; diff --git a/static/js/settings_notifications.js b/static/js/settings_notifications.js index f571751d46d15..8ef09aa7a491b 100644 --- a/static/js/settings_notifications.js +++ b/static/js/settings_notifications.js @@ -102,3 +102,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_notifications; } +window.settings_notifications = settings_notifications; diff --git a/static/js/settings_org.js b/static/js/settings_org.js index 0dbef264d71af..8ca3db060b435 100644 --- a/static/js/settings_org.js +++ b/static/js/settings_org.js @@ -1057,3 +1057,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_org; } +window.settings_org = settings_org; diff --git a/static/js/settings_panel_menu.js b/static/js/settings_panel_menu.js index c4b541dc3e840..98312b4e41f1d 100644 --- a/static/js/settings_panel_menu.js +++ b/static/js/settings_panel_menu.js @@ -141,3 +141,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_panel_menu; } + +window.settings_panel_menu = settings_panel_menu; diff --git a/static/js/settings_profile_fields.js b/static/js/settings_profile_fields.js index c6dad3b3ebfa7..7104f745a56eb 100644 --- a/static/js/settings_profile_fields.js +++ b/static/js/settings_profile_fields.js @@ -264,3 +264,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_profile_fields; } +window.settings_profile_fields = settings_profile_fields; diff --git a/static/js/settings_sections.js b/static/js/settings_sections.js index a95a02ebfae6b..c4807bc651c4b 100644 --- a/static/js/settings_sections.js +++ b/static/js/settings_sections.js @@ -44,3 +44,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_sections; } +window.settings_sections = settings_sections; diff --git a/static/js/settings_streams.js b/static/js/settings_streams.js index 750501c0cf45f..d8eb7bbe9a466 100644 --- a/static/js/settings_streams.js +++ b/static/js/settings_streams.js @@ -147,3 +147,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_streams; } +window.settings_streams = settings_streams; diff --git a/static/js/settings_toggle.js b/static/js/settings_toggle.js index 58c5a20767839..2efd3c15c8746 100644 --- a/static/js/settings_toggle.js +++ b/static/js/settings_toggle.js @@ -38,3 +38,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_toggle; } +window.settings_toggle = settings_toggle; diff --git a/static/js/settings_ui.js b/static/js/settings_ui.js index 6cf7ac2b48814..ceece01c9d83d 100644 --- a/static/js/settings_ui.js +++ b/static/js/settings_ui.js @@ -84,3 +84,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_ui; } +window.settings_ui = settings_ui; diff --git a/static/js/settings_user_groups.js b/static/js/settings_user_groups.js index ae238c2227254..68dc8a8264af6 100644 --- a/static/js/settings_user_groups.js +++ b/static/js/settings_user_groups.js @@ -312,3 +312,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_user_groups; } +window.settings_user_groups = settings_user_groups; diff --git a/static/js/settings_users.js b/static/js/settings_users.js index d6a69c31143cc..8e9c2c7dde860 100644 --- a/static/js/settings_users.js +++ b/static/js/settings_users.js @@ -449,3 +449,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = settings_users; } +window.settings_users = settings_users; diff --git a/static/js/setup.js b/static/js/setup.js index 77caab00331a1..b4aef5bd4fd58 100644 --- a/static/js/setup.js +++ b/static/js/setup.js @@ -19,9 +19,9 @@ $(function () { } else if (!page_params.needs_tutorial) { $('#first_run_message').show(); } - // This requires that we used Django's {% csrf_token %} somewhere on the page. csrf_token = $('input[name="csrfmiddlewaretoken"]').attr('value'); + window.csrf_token = csrf_token; // This is an issue fix where in jQuery v3 the result of outerHeight on a node diff --git a/static/js/socket.js b/static/js/socket.js index 2027c08a6b24f..f504b7fc1b9c9 100644 --- a/static/js/socket.js +++ b/static/js/socket.js @@ -407,3 +407,4 @@ return Socket; if (typeof module !== 'undefined') { module.exports = Socket; } +window.Socket = Socket; diff --git a/static/js/stream_color.js b/static/js/stream_color.js index e9fbd0dc3441f..8be1f152dbe81 100644 --- a/static/js/stream_color.js +++ b/static/js/stream_color.js @@ -198,3 +198,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = stream_color; } +window.stream_color = stream_color; diff --git a/static/js/stream_create.js b/static/js/stream_create.js index 4ee648a334893..68733231e9cf3 100644 --- a/static/js/stream_create.js +++ b/static/js/stream_create.js @@ -452,3 +452,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = stream_create; } +window.stream_create = stream_create; diff --git a/static/js/stream_data.js b/static/js/stream_data.js index fa06bf62be618..6a6b98715a3cb 100644 --- a/static/js/stream_data.js +++ b/static/js/stream_data.js @@ -575,3 +575,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = stream_data; } +window.stream_data = stream_data; diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js index f0f4711529d34..f599e405eaad2 100644 --- a/static/js/stream_edit.js +++ b/static/js/stream_edit.js @@ -694,3 +694,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = stream_edit; } +window.stream_edit = stream_edit; diff --git a/static/js/stream_events.js b/static/js/stream_events.js index 6e490442637a0..9e78b0cafd416 100644 --- a/static/js/stream_events.js +++ b/static/js/stream_events.js @@ -151,3 +151,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = stream_events; } +window.stream_events = stream_events; diff --git a/static/js/stream_list.js b/static/js/stream_list.js index 44c8580d94efb..0973c4d6619d5 100644 --- a/static/js/stream_list.js +++ b/static/js/stream_list.js @@ -636,3 +636,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = stream_list; } +window.stream_list = stream_list; diff --git a/static/js/stream_muting.js b/static/js/stream_muting.js index bb0729a8ff2b0..6debf693b5a85 100644 --- a/static/js/stream_muting.js +++ b/static/js/stream_muting.js @@ -61,3 +61,4 @@ if (typeof module !== 'undefined') { module.exports = stream_muting; } +window.stream_muting = stream_muting; diff --git a/static/js/stream_popover.js b/static/js/stream_popover.js index dd56602517dca..d412f5f09910f 100644 --- a/static/js/stream_popover.js +++ b/static/js/stream_popover.js @@ -380,3 +380,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = stream_popover; } +window.stream_popover = stream_popover; diff --git a/static/js/stream_sort.js b/static/js/stream_sort.js index 88a048dbcbe6a..b08d8fd8c1b15 100644 --- a/static/js/stream_sort.js +++ b/static/js/stream_sort.js @@ -142,3 +142,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = stream_sort; } +window.stream_sort = stream_sort; diff --git a/static/js/submessage.js b/static/js/submessage.js index b105e76a9d3f8..47c61a138a8a2 100644 --- a/static/js/submessage.js +++ b/static/js/submessage.js @@ -159,3 +159,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = submessage; } + +window.submessage = submessage; diff --git a/static/js/subs.js b/static/js/subs.js index b3e99e528aea9..b5959cc4426db 100644 --- a/static/js/subs.js +++ b/static/js/subs.js @@ -868,3 +868,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = subs; } +window.subs = subs; diff --git a/static/js/tab_bar.js b/static/js/tab_bar.js index ea00723066a0a..032202dc94ddd 100644 --- a/static/js/tab_bar.js +++ b/static/js/tab_bar.js @@ -183,3 +183,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = tab_bar; } +window.tab_bar = tab_bar; diff --git a/static/js/templates.js b/static/js/templates.js index 023bae66ac8c7..0ad0bbbc1800b 100644 --- a/static/js/templates.js +++ b/static/js/templates.js @@ -112,3 +112,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = templates; } +window.templates = templates; diff --git a/static/js/tictactoe_widget.js b/static/js/tictactoe_widget.js index da18d5c881ed9..c5f31d9f5f7cb 100644 --- a/static/js/tictactoe_widget.js +++ b/static/js/tictactoe_widget.js @@ -155,3 +155,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = tictactoe_widget; } + +window.tictactoe_widget = tictactoe_widget; diff --git a/static/js/timerender.js b/static/js/timerender.js index b5e993387d1cd..dca7b2801b0ee 100644 --- a/static/js/timerender.js +++ b/static/js/timerender.js @@ -289,3 +289,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = timerender; } +window.timerender = timerender; diff --git a/static/js/top_left_corner.js b/static/js/top_left_corner.js index dec450097785c..c785480e0d818 100644 --- a/static/js/top_left_corner.js +++ b/static/js/top_left_corner.js @@ -99,3 +99,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = top_left_corner; } +window.top_left_corner = top_left_corner; diff --git a/static/js/topic_data.js b/static/js/topic_data.js index a5e4c812d451f..d9e726f683b0e 100644 --- a/static/js/topic_data.js +++ b/static/js/topic_data.js @@ -204,3 +204,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = topic_data; } +window.topic_data = topic_data; diff --git a/static/js/topic_generator.js b/static/js/topic_generator.js index 356b0f0692a91..2a740bb1082a8 100644 --- a/static/js/topic_generator.js +++ b/static/js/topic_generator.js @@ -273,3 +273,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = topic_generator; } +window.topic_generator = topic_generator; diff --git a/static/js/topic_list.js b/static/js/topic_list.js index 65b8a7b163c94..72b0e097ca3bf 100644 --- a/static/js/topic_list.js +++ b/static/js/topic_list.js @@ -316,3 +316,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = topic_list; } +window.topic_list = topic_list; diff --git a/static/js/transmit.js b/static/js/transmit.js index 21a8c35575fd0..6f634b327c3f9 100644 --- a/static/js/transmit.js +++ b/static/js/transmit.js @@ -138,3 +138,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = transmit; } +window.transmit = transmit; diff --git a/static/js/tutorial.js b/static/js/tutorial.js index a51e2ef455590..3e1ae083ea9b3 100644 --- a/static/js/tutorial.js +++ b/static/js/tutorial.js @@ -22,3 +22,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = tutorial; } +window.tutorial = tutorial; diff --git a/static/js/typeahead_helper.js b/static/js/typeahead_helper.js index 53ab1b0a72467..2b7e7e4d1cc27 100644 --- a/static/js/typeahead_helper.js +++ b/static/js/typeahead_helper.js @@ -370,3 +370,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = typeahead_helper; } +window.typeahead_helper = typeahead_helper; diff --git a/static/js/typing.js b/static/js/typing.js index 05d97dae1d740..fa12fd352be59 100644 --- a/static/js/typing.js +++ b/static/js/typing.js @@ -101,3 +101,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = typing; } +window.typing = typing; diff --git a/static/js/typing_data.js b/static/js/typing_data.js index b657f9c780a99..6b9926fdc9606 100644 --- a/static/js/typing_data.js +++ b/static/js/typing_data.js @@ -79,3 +79,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = typing_data; } +window.typing_data = typing_data; diff --git a/static/js/typing_events.js b/static/js/typing_events.js index 81f0ca933dcae..e932e380a6967 100644 --- a/static/js/typing_events.js +++ b/static/js/typing_events.js @@ -99,3 +99,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = typing_events; } +window.typing_events = typing_events; diff --git a/static/js/typing_status.js b/static/js/typing_status.js index 30884614e771d..8fa4a4fd8d272 100644 --- a/static/js/typing_status.js +++ b/static/js/typing_status.js @@ -139,3 +139,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = typing_status; } +window.typing_status = typing_status; diff --git a/static/js/ui.js b/static/js/ui.js index 6dd9dc619842d..723e1717a26af 100644 --- a/static/js/ui.js +++ b/static/js/ui.js @@ -209,3 +209,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = ui; } +window.ui = ui; diff --git a/static/js/ui_report.js b/static/js/ui_report.js index 10c05e91cd4cd..ca4e5c58bda61 100644 --- a/static/js/ui_report.js +++ b/static/js/ui_report.js @@ -87,3 +87,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = ui_report; } +window.ui_report = ui_report; diff --git a/static/js/ui_util.js b/static/js/ui_util.js index c0cbf72f6ed0e..69c079750ee08 100644 --- a/static/js/ui_util.js +++ b/static/js/ui_util.js @@ -50,3 +50,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = ui_util; } +window.ui_util = ui_util; diff --git a/static/js/unread.js b/static/js/unread.js index cb11c956be3fe..857c3b3801324 100644 --- a/static/js/unread.js +++ b/static/js/unread.js @@ -623,3 +623,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = unread; } +window.unread = unread; diff --git a/static/js/unread_ops.js b/static/js/unread_ops.js index 1283a5a07f707..8970138ab5fad 100644 --- a/static/js/unread_ops.js +++ b/static/js/unread_ops.js @@ -128,3 +128,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = unread_ops; } +window.unread_ops = unread_ops; diff --git a/static/js/unread_ui.js b/static/js/unread_ui.js index 85744c9a48907..a08b2e09604aa 100644 --- a/static/js/unread_ui.js +++ b/static/js/unread_ui.js @@ -121,3 +121,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = unread_ui; } +window.unread_ui = unread_ui; diff --git a/static/js/upload.js b/static/js/upload.js index bc9aa8bee71dc..c1eb22256998d 100644 --- a/static/js/upload.js +++ b/static/js/upload.js @@ -189,3 +189,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = upload; } +window.upload = upload; diff --git a/static/js/upload_widget.js b/static/js/upload_widget.js index 5952e5e650d4a..6fab38fb029f3 100644 --- a/static/js/upload_widget.js +++ b/static/js/upload_widget.js @@ -175,3 +175,4 @@ var upload_widget = (function () { if (typeof module !== 'undefined') { module.exports = upload_widget; } +window.upload_widget = upload_widget; diff --git a/static/js/user_events.js b/static/js/user_events.js index dfeeaeb54ec61..1d0abd0665f0f 100644 --- a/static/js/user_events.js +++ b/static/js/user_events.js @@ -79,3 +79,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = user_events; } +window.user_events = user_events; diff --git a/static/js/user_groups.js b/static/js/user_groups.js index e5752080955cd..c6c5c61aee87a 100644 --- a/static/js/user_groups.js +++ b/static/js/user_groups.js @@ -96,3 +96,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = user_groups; } +window.user_groups = user_groups; diff --git a/static/js/user_pill.js b/static/js/user_pill.js index 820dbcc5f0a9b..c5fc271197b59 100644 --- a/static/js/user_pill.js +++ b/static/js/user_pill.js @@ -137,3 +137,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = user_pill; } +window.user_pill = user_pill; diff --git a/static/js/user_search.js b/static/js/user_search.js index 98b4c92114d85..e6f886c6406e2 100644 --- a/static/js/user_search.js +++ b/static/js/user_search.js @@ -114,3 +114,4 @@ var user_search = function (opts) { if (typeof module !== 'undefined') { module.exports = user_search; } +window.user_search = user_search; diff --git a/static/js/util.js b/static/js/util.js index eb230a589a56e..3b51536901810 100644 --- a/static/js/util.js +++ b/static/js/util.js @@ -294,3 +294,4 @@ return exports; if (typeof module !== 'undefined') { module.exports = util; } +window.util = util; diff --git a/static/js/voting_widget.js b/static/js/voting_widget.js index 9403b6baacff9..30c5803a0a149 100644 --- a/static/js/voting_widget.js +++ b/static/js/voting_widget.js @@ -230,3 +230,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = voting_widget; } + +window.voting_widget = voting_widget; diff --git a/static/js/widgetize.js b/static/js/widgetize.js index 1c9950900b045..37245c199c1ff 100644 --- a/static/js/widgetize.js +++ b/static/js/widgetize.js @@ -104,3 +104,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = widgetize; } + +window.widgetize = widgetize; diff --git a/static/js/zcommand.js b/static/js/zcommand.js index a71a4918dbac7..e285072035e10 100644 --- a/static/js/zcommand.js +++ b/static/js/zcommand.js @@ -104,3 +104,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = zcommand; } + +window.zcommand = zcommand; diff --git a/static/js/zform.js b/static/js/zform.js index 3fe04b1d445ab..ceacc27a509b2 100644 --- a/static/js/zform.js +++ b/static/js/zform.js @@ -113,3 +113,5 @@ return exports; if (typeof module !== 'undefined') { module.exports = zform; } + +window.zform = zform; diff --git a/static/js/zulip.js b/static/js/zulip.js index de362f63797a7..e4c5cc587315e 100644 --- a/static/js/zulip.js +++ b/static/js/zulip.js @@ -12,3 +12,6 @@ var current_msg_list = home_msg_list; if (typeof module !== 'undefined') { module.exports.current_msg_list = current_msg_list; } + +window.home_msg_list = home_msg_list; +window.current_msg_list = current_msg_list;