Removed require of socketio, l10n, html10n and error reporter

This commit is contained in:
SamTV12345 2024-07-13 22:14:57 +02:00
parent b8291ef316
commit 2bf3ef58bc
5 changed files with 12 additions and 7 deletions

View file

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

View file

@ -1,4 +1,4 @@
'use strict'; import io from 'socket.io-client';
/** /**
* Creates a socket.io connection. * 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 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
window.html10n = (function(window, document, undefined) { export let html10n = (function(window, document, undefined) {
// fix console // fix console
(function() { (function() {
@ -1054,3 +1054,7 @@ window.html10n = (function(window, document, undefined) {
return html10n return html10n
})(window, document) })(window, document)
export default html10n
window.html10n = html10n

View file

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

View file

@ -1,5 +1,8 @@
(async () => { (async () => {
require('../../src/static/js/l10n')
window.clientVars = { window.clientVars = {
// This is needed to fetch /pluginfw/plugin-definitions.json, which happens before the server // This is needed to fetch /pluginfw/plugin-definitions.json, which happens before the server
// sends the CLIENT_VARS message. // sends the CLIENT_VARS message.
@ -23,6 +26,7 @@
window.padeditbar = require('../../src/static/js/pad_editbar').padeditbar; window.padeditbar = require('../../src/static/js/pad_editbar').padeditbar;
window.padimpexp = require('../../src/static/js/pad_impexp').padimpexp; window.padimpexp = require('../../src/static/js/pad_impexp').padimpexp;
require('../../src/static/js/skin_variants'); require('../../src/static/js/skin_variants');
require('../../src/static/js/basic_error_handler')
window.plugins.baseURL = basePath; window.plugins.baseURL = basePath;
await window.plugins.update(new Map([ await window.plugins.update(new Map([