From 84e40b5eb4eb2267562bdde4e99188954c9260d5 Mon Sep 17 00:00:00 2001 From: kkapsner Date: Sat, 1 Feb 2020 22:00:39 +0100 Subject: [PATCH] Some code improvements Fixes #439 --- lib/modifiedScreenAPI.js | 2 +- lib/randomSupplies.js | 1 - options/presets.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/modifiedScreenAPI.js b/lib/modifiedScreenAPI.js index 5ea6349..563b336 100644 --- a/lib/modifiedScreenAPI.js +++ b/lib/modifiedScreenAPI.js @@ -212,7 +212,7 @@ /\(\s*(?:(min|max)-)?device-(width|height):\s+(\d+\.?\d*)px\s*\)/, function(m, type, dimension, value){ value = parseFloat(value); - let newCompareValue = value; + let newCompareValue; switch (type){ case "min": if (value <= dimensions[dimension]){ diff --git a/lib/randomSupplies.js b/lib/randomSupplies.js index 1a81bd0..9e9c4cf 100644 --- a/lib/randomSupplies.js +++ b/lib/randomSupplies.js @@ -63,7 +63,6 @@ }; const settings = require("./settings"); - const logging = require("./logging"); const extension = require("./extension"); function getDomain(window){ diff --git a/options/presets.js b/options/presets.js index 04f2b05..47bdb02 100644 --- a/options/presets.js +++ b/options/presets.js @@ -152,7 +152,7 @@ introduction.textContent = extension.getTranslation("presets_introduction"); head.appendChild(introduction); - const [settingsLoaded, presets] = await Promise.all([ + const [, presets] = await Promise.all([ settings.loaded, (await fetch("presets.json")).json() ]);