diff --git a/src/static/js/l10n.js b/src/static/js/l10n.js index 7206f913b..ab80ef3ca 100644 --- a/src/static/js/l10n.js +++ b/src/static/js/l10n.js @@ -1,4 +1,5 @@ -'use strict'; +import html10n from '../js/vendors/html10n'; + ((document) => { // Set language for l10n diff --git a/src/static/js/socketio.js b/src/static/js/socketio.js index 1d3739775..cdc1c9a23 100644 --- a/src/static/js/socketio.js +++ b/src/static/js/socketio.js @@ -1,4 +1,4 @@ -'use strict'; +import io from 'socket.io-client'; /** * Creates a socket.io connection. diff --git a/src/static/js/vendors/html10n.js b/src/static/js/vendors/html10n.js index 50b6d2279..1f6a11728 100644 --- a/src/static/js/vendors/html10n.js +++ b/src/static/js/vendors/html10n.js @@ -22,7 +22,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -window.html10n = (function(window, document, undefined) { +export let html10n = (function(window, document, undefined) { // fix console (function() { @@ -1054,3 +1054,7 @@ window.html10n = (function(window, document, undefined) { return html10n })(window, document) + +export default html10n + +window.html10n = html10n diff --git a/src/templates/pad.html b/src/templates/pad.html index 0d7072f82..08437b628 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -34,7 +34,6 @@ for the JavaScript code in this page.| */ - @@ -53,8 +52,6 @@ <% e.end_block(); %> - - <% e.begin_block("body"); %> @@ -441,7 +438,6 @@ <% e.begin_block("scripts"); %> - diff --git a/src/templates/padBootstrap.js b/src/templates/padBootstrap.js index 62dd44b58..c86d170c1 100644 --- a/src/templates/padBootstrap.js +++ b/src/templates/padBootstrap.js @@ -1,5 +1,8 @@ (async () => { + + require('../../src/static/js/l10n') + window.clientVars = { // This is needed to fetch /pluginfw/plugin-definitions.json, which happens before the server // sends the CLIENT_VARS message. @@ -23,6 +26,7 @@ window.padeditbar = require('../../src/static/js/pad_editbar').padeditbar; window.padimpexp = require('../../src/static/js/pad_impexp').padimpexp; require('../../src/static/js/skin_variants'); + require('../../src/static/js/basic_error_handler') window.plugins.baseURL = basePath; await window.plugins.update(new Map([