diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-09 23:50:03 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-09 23:50:03 +0200 |
commit | e9c34b2a539052ca82eebc6c1d474d59c6ec6690 (patch) | |
tree | 0c831c24f25f6accbb7a046d15a4b8f190a71389 /fzf.js | |
parent | f2b0c6787996f205bc71c4e059a69b9427672b1d (diff) | |
download | local-nhentai-e9c34b2a539052ca82eebc6c1d474d59c6ec6690.tar.xz |
Add multiple tags selector and speed up doujin stats
Diffstat (limited to 'fzf.js')
-rw-r--r-- | fzf.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,6 +1,6 @@ const child = require("child_process") -module.exports = (options, binary = "fzf") => { +module.exports.fzf = (options, binary = "fzf") => { let res, rej const prom = new Promise((rs, rj) => [res, rej] = [rs, rj]) @@ -22,3 +22,7 @@ module.exports = (options, binary = "fzf") => { return prom } + +module.exports.doujin = doujins => module.exports.fzf(doujins.sort(), __dirname + "/fzf-previews") + .then(doujin => child.spawn("firefox", [`file://${process.cwd()}/${doujin}/index.html`])) + .catch(_ => {}) |