summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorrien333 <rien334@gmail.com>2020-10-01 23:15:52 +0200
committerrien333 <rien334@gmail.com>2020-10-01 23:15:52 +0200
commit5616db64eec5c95c1bd06c9020c7fa183371f510 (patch)
treed3de5e53576734766eb402ac4a9991f259bba217 /misc
parent2ec17db260438a7d3fb43b56efcd285229bf9675 (diff)
downloadqutebrowser-5616db64eec5c95c1bd06c9020c7fa183371f510.tar.gz
qutebrowser-5616db64eec5c95c1bd06c9020c7fa183371f510.zip
Define variables using let instead of var
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/userscripts/readability-js13
1 files changed, 7 insertions, 6 deletions
diff --git a/misc/userscripts/readability-js b/misc/userscripts/readability-js
index b93ac64a2..ce88795ea 100755
--- a/misc/userscripts/readability-js
+++ b/misc/userscripts/readability-js
@@ -102,16 +102,17 @@ if (!fs.existsSync(scriptsDir)) {
fs.mkdirSync(scriptsDir);
}
+let getDOM, domOpts, target;
// When hinting, use the selected hint instead of the current page
if (process.env.QUTE_MODE === 'hints') {
- var getDOM = JSDOM.fromURL;
- var domOpts = {};
- var target = process.env.QUTE_URL;
+ getDOM = JSDOM.fromURL;
+ domOpts = {};
+ target = process.env.QUTE_URL;
}
else {
- var getDOM = JSDOM.fromFile;
- var domOpts = {url: process.env.QUTE_URL, contentType: "text/html; charset=utf-8"};
- var target = process.env.QUTE_HTML;
+ getDOM = JSDOM.fromFile;
+ domOpts = {url: process.env.QUTE_URL, contentType: "text/html; charset=utf-8"};
+ target = process.env.QUTE_HTML;
}
getDOM(target, domOpts).then(dom => {