1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Some code improvements

Fixes #439
This commit is contained in:
kkapsner 2020-02-01 22:00:39 +01:00
parent ada2845213
commit 84e40b5eb4
3 changed files with 2 additions and 3 deletions

View File

@ -212,7 +212,7 @@
/\(\s*(?:(min|max)-)?device-(width|height):\s+(\d+\.?\d*)px\s*\)/, /\(\s*(?:(min|max)-)?device-(width|height):\s+(\d+\.?\d*)px\s*\)/,
function(m, type, dimension, value){ function(m, type, dimension, value){
value = parseFloat(value); value = parseFloat(value);
let newCompareValue = value; let newCompareValue;
switch (type){ switch (type){
case "min": case "min":
if (value <= dimensions[dimension]){ if (value <= dimensions[dimension]){

View File

@ -63,7 +63,6 @@
}; };
const settings = require("./settings"); const settings = require("./settings");
const logging = require("./logging");
const extension = require("./extension"); const extension = require("./extension");
function getDomain(window){ function getDomain(window){

View File

@ -152,7 +152,7 @@
introduction.textContent = extension.getTranslation("presets_introduction"); introduction.textContent = extension.getTranslation("presets_introduction");
head.appendChild(introduction); head.appendChild(introduction);
const [settingsLoaded, presets] = await Promise.all([ const [, presets] = await Promise.all([
settings.loaded, settings.loaded,
(await fetch("presets.json")).json() (await fetch("presets.json")).json()
]); ]);