aboutsummaryrefslogtreecommitdiff
path: root/manifest.json
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-03-03 14:40:55 +0100
committerWojtek Kosior <koszko@koszko.org>2022-03-04 16:13:39 +0100
commit652e4476fdc2c7177145c0d993159f84a5f64c55 (patch)
treece4b77f2b64bb1e8d2586104e9c9515027dd69ef /manifest.json
parent22fe27f0e1399deaf13b416f2d35a2e12ea0f358 (diff)
downloadbrowser-extension-652e4476fdc2c7177145c0d993159f84a5f64c55.tar.gz
browser-extension-652e4476fdc2c7177145c0d993159f84a5f64c55.zip
improve styling of item preview
Diffstat (limited to 'manifest.json')
0 files changed, 0 insertions, 0 deletions
locked = false;
- for (const attr of [...element.attributes || []]
- .filter(attr => /^(href|src|data)$/i.test(attr.localName))
- .filter(attr => bad_url_reg.test(attr.value))) {
+ const bad_attrs = [...(element.attributes || [])]
+ .filter(attr => /^(href|src|data)$/i.test(attr.localName))
+ .filter(attr => bad_url_reg.test(attr.value));
+
+ for (const attr of bad_attrs) {
/*
* Under some browsers (Mozilla) removing attributes doesn't stop their
* javascript from executing, but replacing them does. For 'src' and