diff --git a/Clipper/content_scripts/index.js b/Clipper/content_scripts/index.js index 9a4f0f93f5..05ac58cb96 100644 --- a/Clipper/content_scripts/index.js +++ b/Clipper/content_scripts/index.js @@ -226,8 +226,9 @@ const nodeName = node.nodeName.toLowerCase(); const nodeParent = node.parentNode; const nodeParentName = nodeParent ? nodeParent.nodeName.toLowerCase() : ''; + const computedStyle = node.nodeType === 1 ? window.getComputedStyle(node) : {}; - let isVisible = node.nodeType === 1 ? window.getComputedStyle(node).display !== 'none' : true; + let isVisible = node.nodeType === 1 ? computedStyle.display !== 'none' && computedStyle.visibility !== 'hidden' : true; if (isVisible && ['script', 'noscript', 'style', 'select', 'option', 'button'].indexOf(nodeName) >= 0) isVisible = false; // If it's a text input or a textarea and it has a value, save