forked from zombieFox/nightTab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.js
More file actions
23 lines (19 loc) · 784 Bytes
/
Copy pathbackground.js
File metadata and controls
23 lines (19 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var background = (function() {
var render = function() {
var html = helper.e("html");
html.style.setProperty("--background-image", "url(\"" + state.get().background.image.url + "\")");
html.style.setProperty("--background-blur", state.get().background.image.blur + "px");
html.style.setProperty("--background-grayscale", state.get().background.image.grayscale);
html.style.setProperty("--background-opacity", state.get().background.image.opacity);
html.style.setProperty("--background-scale", state.get().background.image.scale);
html.style.setProperty("--background-accent-opacity", state.get().background.image.accent);
};
var init = function() {
render();
};
// exposed methods
return {
render: render,
init: init
};
})();