From 4998b34cbe86760b8630ff921cde692471aa824b Mon Sep 17 00:00:00 2001 From: Emir <31805948+admiraldus@users.noreply.github.com> Date: Sat, 5 Dec 2020 01:07:47 +0300 Subject: [PATCH] option: hide 'page details' text for word counter (#315) * option: hide 'page details' text for word counter * fix version number (semver) * set camel case to snake case --- mods/word-counter/mod.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mods/word-counter/mod.js b/mods/word-counter/mod.js index b39c37b..fa2ccbc 100644 --- a/mods/word-counter/mod.js +++ b/mods/word-counter/mod.js @@ -1,6 +1,7 @@ /* * word counter * (c) 2020 dragonwocky (https://dragonwocky.me/) + * (c) 2020 admiraldus (https://github.com/admiraldus) * under the MIT license */ @@ -14,8 +15,16 @@ module.exports = { name: 'word counter', desc: 'add page details: word/character/sentence/block count & speaking/reading times.', - version: '0.1.0', + version: '0.2.0', author: 'dragonwocky', + options: [ + { + key: 'hide_page_details_text', + label: 'hide "page details" text', + type: 'toggle', + value: false, + }, + ], hacks: { 'renderer/preload.js'(store, __exports) { const copyToClipboard = (str) => { @@ -99,7 +108,7 @@ module.exports = { ]; $container.children[0].innerHTML = ` - page details
(click to copy)
+ ${store().hide_page_details_text ? '' : 'page details
(click to copy)
'} ${Object.keys(details).reduce( (prev, key) => prev +