aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gotify/webview.js
diff options
context:
space:
mode:
authorLibravatar Kromonos <support@bka.li>2023-04-25 00:42:22 +0200
committerLibravatar GitHub <noreply@github.com>2023-04-24 23:42:22 +0100
commite91222a6db229f267b3761f3228aaae60435d2bd (patch)
treeaf36df837995e9bf46958a152a0960649457e40d /recipes/gotify/webview.js
parentadd magnouvean as a contributor for code (#339) [skip ci] (diff)
downloadferdium-recipes-e91222a6db229f267b3761f3228aaae60435d2bd.tar.gz
ferdium-recipes-e91222a6db229f267b3761f3228aaae60435d2bd.tar.zst
ferdium-recipes-e91222a6db229f267b3761f3228aaae60435d2bd.zip
Add Gotify recipe (#336)
Diffstat (limited to 'recipes/gotify/webview.js')
-rw-r--r--recipes/gotify/webview.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes/gotify/webview.js b/recipes/gotify/webview.js
new file mode 100644
index 0000000..46762ed
--- /dev/null
+++ b/recipes/gotify/webview.js
@@ -0,0 +1,16 @@
1const _path = _interopRequireDefault(require('path'));
2
3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
6
7module.exports = Ferdium => {
8 const getMessages = () => {
9 let count = document.querySelectorAll('#messages').length;
10
11 Ferdium.setBadge(count);
12 };
13
14 Ferdium.loop(getMessages);
15 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
16};