-
Notifications
You must be signed in to change notification settings - Fork 14
/
client.js
23 lines (19 loc) · 875 Bytes
/
client.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict';
const eejs = require('ep_etherpad-lite/node/eejs');
const settings = require('ep_etherpad-lite/node/utils/Settings');
exports.eejsBlock_mySettings = (hookName, args, cb) => {
args.content += eejs.require('ep_email_notifications/templates/email_notifications_settings.ejs');
cb();
};
exports.eejsBlock_styles = (hookName, args, cb) => {
const url = '../static/plugins/ep_email_notifications/static/css/email_notifications.css';
args.content += `<link href="${url}" rel="stylesheet">`;
cb();
};
exports.clientVars = (hook, context, callback) => {
const pluginSettings = settings.ep_email_notifications;
const panelDisplayLocation = (pluginSettings && pluginSettings.panelDisplayLocation)
? pluginSettings.panelDisplayLocation : 'undefined';
// return the setting to the clientVars, sending the value
callback({panelDisplayLocation});
};