mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-14 18:24:45 -04:00
timeslider: slight improvement on code quality (#4836)
This is an interim patch, ultimately the JS needs to be thrown out of the HTML...
This commit is contained in:
parent
1b8cd0747d
commit
543e94fd4a
1 changed files with 9 additions and 9 deletions
|
@ -265,12 +265,12 @@
|
||||||
// server sends the CLIENT_VARS message.
|
// server sends the CLIENT_VARS message.
|
||||||
randomVersionString: <%-JSON.stringify(settings.randomVersionString)%>,
|
randomVersionString: <%-JSON.stringify(settings.randomVersionString)%>,
|
||||||
};
|
};
|
||||||
var BroadcastSlider;
|
let BroadcastSlider;
|
||||||
(function () {
|
(function () {
|
||||||
var pathComponents = location.pathname.split('/');
|
const pathComponents = location.pathname.split('/');
|
||||||
|
|
||||||
// Strip 'p', the padname and 'timeslider' from the pathname and set as baseURL
|
// Strip 'p', the padname and 'timeslider' from the pathname and set as baseURL
|
||||||
var baseURL = pathComponents.slice(0,pathComponents.length-3).join('/') + '/';
|
const baseURL = pathComponents.slice(0,pathComponents.length-3).join('/') + '/';
|
||||||
|
|
||||||
|
|
||||||
require.setRootURI(baseURL + "javascripts/src");
|
require.setRootURI(baseURL + "javascripts/src");
|
||||||
|
@ -280,20 +280,20 @@
|
||||||
$ = jQuery = require('ep_etherpad-lite/static/js/rjquery').jQuery; // Expose jQuery #HACK
|
$ = jQuery = require('ep_etherpad-lite/static/js/rjquery').jQuery; // Expose jQuery #HACK
|
||||||
browser = require('ep_etherpad-lite/static/js/vendors/browser');
|
browser = require('ep_etherpad-lite/static/js/vendors/browser');
|
||||||
|
|
||||||
var plugins = require('ep_etherpad-lite/static/js/pluginfw/client_plugins');
|
const plugins = require('ep_etherpad-lite/static/js/pluginfw/client_plugins');
|
||||||
var socket = require('ep_etherpad-lite/static/js/timeslider').socket;
|
const socket = require('ep_etherpad-lite/static/js/timeslider').socket;
|
||||||
BroadcastSlider = require('ep_etherpad-lite/static/js/timeslider').BroadcastSlider;
|
BroadcastSlider = require('ep_etherpad-lite/static/js/timeslider').BroadcastSlider;
|
||||||
plugins.baseURL = baseURL;
|
plugins.baseURL = baseURL;
|
||||||
|
|
||||||
plugins.update(function () {
|
plugins.update(function () {
|
||||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
||||||
var timeslider = require('ep_etherpad-lite/static/js/timeslider')
|
const timeslider = require('ep_etherpad-lite/static/js/timeslider')
|
||||||
timeslider.baseURL = baseURL;
|
timeslider.baseURL = baseURL;
|
||||||
timeslider.init();
|
timeslider.init();
|
||||||
|
|
||||||
/* TODO: These globals shouldn't exist. */
|
/* TODO: These globals shouldn't exist. */
|
||||||
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
const padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
||||||
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
const padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
||||||
|
|
||||||
padeditbar.init()
|
padeditbar.init()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue