From 527595f79bf97bc2d17cb821c8bb6b4e8b6776f9 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 25 Nov 2019 14:25:11 -0500 Subject: Remove unnecessary escapes from regex literals --- ext/fg/js/document.js | 2 +- ext/fg/js/popup.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/fg/js') diff --git a/ext/fg/js/document.js b/ext/fg/js/document.js index 3dd12a40..10dea7df 100644 --- a/ext/fg/js/document.js +++ b/ext/fg/js/document.js @@ -17,7 +17,7 @@ */ -const REGEX_TRANSPARENT_COLOR = /rgba\s*\([^\)]*,\s*0(?:\.0+)?\s*\)/; +const REGEX_TRANSPARENT_COLOR = /rgba\s*\([^)]*,\s*0(?:\.0+)?\s*\)/; function docSetImposterStyle(style, propertyName, value) { style.setProperty(propertyName, value, 'important'); diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js index df784029..c40e5d60 100644 --- a/ext/fg/js/popup.js +++ b/ext/fg/js/popup.js @@ -303,7 +303,7 @@ class Popup { } static getColorInfo(cssColor) { - const m = /^\s*rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d\.]+)\s*)?\)\s*$/.exec(cssColor); + const m = /^\s*rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)\s*$/.exec(cssColor); if (m === null) { return null; } const m4 = m[4]; -- cgit v1.2.3