@samitouri / QOSami-HFS / commits / 18cc35b0

better code: block-scoping is simpler

Massimo Melina committed May 20, 2023 at 16:36 UTC 18cc35b05a1cbc3b4dbbb18389fa797d8b465e29
1 file changed +2 -2
plugins/download-counter/public/main.js
+2 -2
@@ -1,4 +1,4 @@
1 -(() => { // this wrapper avoids name clashing of outer variables and functions
1 +{ // this wrapper avoids name clashing of outer variables and functions
2 const config = HFS.getPluginConfig()
3
4 const inMenu = config.where === 'menu'
@@ -9,4 +9,4 @@
9 if (inMenu && !entry.isFolder)
10 props.push(["Downloads", entry.hits || 0])
11 })
12 -})()
12 +}
\ No newline at end of file