Removed require of socketio, l10n, html10n and error reporter

This commit is contained in:
SamTV12345 2024-07-13 22:14:57 +02:00 committed by SamTv12345
parent 1ccd27e2d3
commit 5d0da514f9
5 changed files with 12 additions and 7 deletions

View file

@ -1,4 +1,5 @@
'use strict';
import html10n from '../js/vendors/html10n';
((document) => {
// Set language for l10n

View file

@ -1,4 +1,4 @@
'use strict';
import io from 'socket.io-client';
/**
* Creates a socket.io connection.

View file

@ -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

View file

@ -34,7 +34,6 @@
for the JavaScript code in this page.|
*/
</script>
<script src="../static/js/basic_error_handler.js?v=<%=settings.randomVersionString%>"></script>
<meta charset="utf-8">
<meta name="robots" content="noindex, nofollow">
@ -53,8 +52,6 @@
<% e.end_block(); %>
<link rel="localizations" type="application/l10n+json" href="../locales.json" />
<script type="text/javascript" src="../static/js/vendors/html10n.js?v=<%=settings.randomVersionString%>"></script>
<script type="text/javascript" src="../static/js/l10n.js?v=<%=settings.randomVersionString%>"></script>
</head>
<body>
<% e.begin_block("body"); %>
@ -441,7 +438,6 @@
<!----------------------------->
<% e.begin_block("scripts"); %>
<script type="text/javascript" src="../socket.io/socket.io.js"></script>
<script src="<%=entrypoint%>"></script>

View file

@ -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([