-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
41 lines (32 loc) · 1.8 KB
/
Copy pathindex.js
File metadata and controls
41 lines (32 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
'use strict';
// Lazy-load all modules so that etherpad-lite dependencies are only resolved
// when the factories are actually called (within the Etherpad runtime).
module.exports = {
// Attributes — generate hooks for formatting attributes
get lineAttribute() { return require('./attributes').lineAttribute; },
get inlineAttribute() { return require('./attributes').inlineAttribute; },
get tagAttribute() { return require('./attributes').tagAttribute; },
// Templates — inject HTML into page sections
get template() { return require('./eejs-blocks').template; },
get rawHTML() { return require('./eejs-blocks').rawHTML; },
// Settings — load plugin config and send to client
get settings() { return require('./settings').settings; },
// Toggle — checkbox in settings panel with cookie persistence
get toggle() { return require('./settings-toggle').toggle; },
// PadToggle — parallel User Settings + Pad Wide Settings checkboxes,
// matching native Etherpad behavior. Pad-wide value rides the existing
// padoptions broadcast/persist rail; degrades gracefully on cores that
// lack the ep_* passthrough patch (Etherpad < 3.0.0).
//
// Server side ONLY here. Client code must import the sub-path
// 'ep_plugin_helpers/pad-toggle' directly to avoid pulling settings-toggle
// and other server-only modules into the client bundle.
get padToggle() { return require('./pad-toggle-server').padToggle; },
// Messages — intercept and relay real-time messages
get messageRelay() { return require('./message-relay').messageRelay; },
// Hide — hide or remove UI elements
get hideCSS() { return require('./hide-elements').hideCSS; },
get removeElement() { return require('./hide-elements').removeElement; },
// Logger
get logger() { return require('./logger').logger; },
};