Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep <noscript> when appropriate #32

Open
Treora opened this issue Aug 7, 2018 · 0 comments
Open

Keep <noscript> when appropriate #32

Treora opened this issue Aug 7, 2018 · 0 comments
Labels
snapshot quality Improving fidelity/size/durability/etc of the output

Comments

@Treora
Copy link
Contributor

Treora commented Aug 7, 2018

This was previously issue #134 in webmemex-extension ("Images not in snapshots from Medium.com").

When the page was viewed with javascript disabled, we should keep <noscript> tags, and perhaps convert them into <div> tags, in order to make the snapshot correspond to what was rendered. See the corresponding comment in the source:

// If noscript content was not shown, we do not want it to show in the snapshot either. Also, we
// capture pages after scripts executed (presumably), so noscript content is likely undesired.
// TODO We should know whether noscript content was visible, and if so keep it in the doc.
// TODO Keep noscript content in fetched iframe docs, as scripts have not been executed there?
const noscripts = Array.from(doc.querySelectorAll('noscript'))
noscripts.forEach(element => element.parentNode.removeChild(element))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snapshot quality Improving fidelity/size/durability/etc of the output
Projects
None yet
Development

No branches or pull requests

1 participant