1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Clipper: Skip noscript elements

This commit is contained in:
Laurent Cozic 2018-06-29 18:45:33 +00:00
parent e75417d26e
commit 70adf10f2e
2 changed files with 5 additions and 15 deletions

View File

@ -38,7 +38,7 @@
const node = childNodes[i];
let isVisible = node.nodeType === 1 ? window.getComputedStyle(node).display !== 'none' : true;
if (isVisible && ['input', 'textarea', 'script', 'style', 'select', 'option', 'button'].indexOf(node.nodeName.toLowerCase()) >= 0) isVisible = false;
if (isVisible && ['input', 'textarea', 'script', 'noscript', 'style', 'select', 'option', 'button'].indexOf(node.nodeName.toLowerCase()) >= 0) isVisible = false;
if (!isVisible) {
element.removeChild(node);

View File

@ -26,6 +26,7 @@
"*.min.js",
"*.bundle.js",
"yarn.lock",
"*.icns"
],
"folder_exclude_patterns":
[
@ -61,20 +62,9 @@
"_releases",
"ReactNativeClient/lib/csstojs",
"Clipper/joplin-webclipper/popup/build",
"Clipper/joplin-webclipper/dist",
"Clipper/joplin-webclipper/dist"
],
"path": "."
},
{
"file_exclude_patterns":
[
"src/log.txt",
],
"folder_exclude_patterns":
[
"node_modules",
],
"path": "D:\\Docs\\PROGS\\Node\\tkwidgets"
}
],
]
}