diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-27 23:14:21 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-09-28 11:28:15 -0400 |
commit | 8110de514edaae5c685282668826bf14db7db557 (patch) | |
tree | 59497c14ca119bb8526f689a1ef82f75a54d4762 | |
parent | 8195e5109b97c284fc1d6c8559de6e5f5941c911 (diff) |
Change skipped node types to use a switch statement
-rw-r--r-- | ext/fg/js/source.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js index 4642de50..2e73be06 100644 --- a/ext/fg/js/source.js +++ b/ext/fg/js/source.js @@ -87,9 +87,11 @@ class TextSourceRange { return false; } - const skip = ['RT', 'SCRIPT', 'STYLE']; - if (skip.includes(node.nodeName.toUpperCase())) { - return false; + switch (node.nodeName.toUpperCase()) { + case 'RT': + case 'SCRIPT': + case 'STYLE': + return false; } const style = window.getComputedStyle(node); |