plugin/download-counter: nicer
Massimo Melina committed
Mar 14, 2023 at 13:11 UTC
24654916d4b3b3b415ed43ff8f8e379c20c4fa69
3 files changed
+3
-2
plugins/download-counter/plugin.js
+1
-1
@@ -1,5 +1,5 @@
1
exports.description = "Counts downloads for each file, and displays the total in the list"
2
-exports.version = 3 // stylizable
2
+exports.version = 3.1 // removed "hits" word
3
exports.apiRequired = 3
4
5
exports.init = async api => {
plugins/download-counter/public/main.js
+1
-1
@@ -1,2 +1,2 @@
1
HFS.onEvent('additionalEntryProps', ({ entry: { hits } }, { t }) =>
2
- hits && '<span class="download-counter">' + t`Hits: ` + hits + '</span>')
2
+ hits && `<span class="download-counter" title="${t`download counter`}">${hits}</span>`)
plugins/download-counter/public/style.css
+1
@@ -1 +1,2 @@
1
+.download-counter::before { content: "↓" }
2
.download-counter::after { content: var(--separator) }