forked from falkirks/ep_brightcolorpicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
31 lines (26 loc) · 867 Bytes
/
index.js
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
var eejs = require("ep_etherpad-lite/node/eejs");
var settings = require('ep_etherpad-lite/node/utils/Settings');
exports.eejsBlock_scripts = function (hook_name, args, cb) {
args.content = args.content + eejs.require("ep_brightcolorpicker/templates/scripts.html", {}, module);
return cb();
};
exports.eejsBlock_styles = function (hook_name, args, cb) {
args.content = args.content + eejs.require("ep_brightcolorpicker/templates/styles.html", {}, module);
return cb();
};
exports.clientVars = function(hook, context, callback)
{
// return the setting to the clientVars, sending the value
if(settings.ep_brightcolorpicker){
return callback({
"brightness": settings.ep_brightcolorpicker.brightness || 0.25,
"columns": settings.ep_brightcolorpicker.columns || 6
});
}
else{
return callback({
"brightness": 0.25,
"columns": 6
});
}
};