Fixed timeslider when hot reloading

This commit is contained in:
SamTv12345 2024-07-17 10:55:30 +02:00
parent bbf4adb075
commit 456f904050
3 changed files with 2 additions and 5 deletions

View file

@ -183,7 +183,7 @@ const handleLiveReload = async (args: any, padString: string, timeSliderString:
// can be removed when require-kernel is dropped
res.header('Feature-Policy', 'sync-xhr \'self\'');
const content = eejs.require('ep_etherpad-lite/templates/pad.html', {
const content = eejs.require('ep_etherpad-lite/templates/timeslider.html', {
req,
toolbar,
isReadOnly,

View file

@ -31,7 +31,7 @@ const randomString = require('./pad_utils').randomString;
const hooks = require('./pluginfw/hooks');
const padutils = require('./pad_utils').padutils;
const socketio = require('./socketio');
import html10n from '../js/vendors/html10n'
let token, padId, exportLinks, socket, changesetLoader, BroadcastSlider;
const init = () => {

View file

@ -483,7 +483,6 @@ export class Html10n {
})
this.build(langs, (er: null, translations: Map<string, any>) =>{
console.log("Translations are", translations)
this.translations = translations
this.translateElement(translations)
this.mt.trigger('localized')
@ -852,7 +851,6 @@ class Loader {
if (xhr.readyState == 4) {
if (xhr.status == 200 || xhr.status === 0) {
const data = JSON.parse(xhr.responseText);
console.log("Data is", data)
this.cache.set(href, data)
// Pass on the contents for parsing
this.parse(lang, href, data, callback)
@ -972,7 +970,6 @@ class Loader {
return
}
console.log("Setting lang", lang)
this.langs.set(lang,data[lang])
// TODO: Also store accompanying langs
callback()