From 2b53c697499c0903b1a8dabc315fcab2f01e7162 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 13 Aug 2021 23:05:26 -0400 Subject: [PATCH] Pad: Defer module loading until plugins are loaded --- src/templates/pad.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/templates/pad.html b/src/templates/pad.html index ebad29645..6f00b98c2 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -485,18 +485,18 @@ if (window._postPluginUpdateForTesting != null) window._postPluginUpdateForTesting(); window._postPluginUpdateForTestingDone = true; $(() => hooks.aCallAll('documentReady')); + + // TODO: These globals shouldn't exist. + window.pad = require('ep_etherpad-lite/static/js/pad').pad; + window.chat = require('ep_etherpad-lite/static/js/chat').chat; + window.padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar; + window.padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp; + + require('ep_etherpad-lite/static/js/skin_variants'); const pad = require('ep_etherpad-lite/static/js/pad'); pad.baseURL = baseURL; pad.init(); }); - - // TODO: These globals shouldn't exist. - window.pad = require('ep_etherpad-lite/static/js/pad').pad; - window.chat = require('ep_etherpad-lite/static/js/chat').chat; - window.padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar; - window.padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp; - - require('ep_etherpad-lite/static/js/skin_variants'); })(); // @license-end