disable-javascript icon indicating copy to clipboard operation
disable-javascript copied to clipboard

<noscript> tag content is not rendered

Open aethernet opened this issue 3 years ago • 4 comments

Hi

Thanks for this nice tool.

I planned to use your extension to test behaviour websites without js for accessibility purposes. But the content of noscript tags aren't rendered to the page.

Is it a feature or a bug? If it's a feature, a way to disable it would be welcome.

Have a wonderful day!

aethernet avatar Oct 29 '20 09:10 aethernet

Hi @aethernet

<noscript> Tags should be rendered correctly if JS is disabled, it was actually the first reported issue: #1 Can you please check this small page: https://pacassi.ch/test.html If JS is disabled, you should see a You don't have javascript enabled. paragraph.

If the behavior works correctly on the above posted page but not on yours, I would need to access your page (or a small proof of concept) in order to reproduce the bug. If the web extension doesn't even work in the aboge posted page, I'll need more information such as:

  • Web extension version
  • Which browser you use in which exact version
  • Which operating system you're using

Thanks for collaborating! :)

dpacassi avatar Oct 29 '20 11:10 dpacassi

Hi,

There is a problem when there are several noscript elements in a page. I've made a CodePen with that code:

<noscript>test 1</noscript>
<noscript>test 2</noscript>
<p>Lorem ipsum paragraph</p>
<noscript>test 3</noscript>

When JavaScript is disabled thanks to the plugin, I can only see:

test 1 Lorem ipsum paragraph test 3

Here is the debug link: https://cdpn.io/juliemoynat/debug/NWRdvQe/xnMabmzPbepr (I think it's a temporary link and I don't know how long it lasts - the original Pen is here: https://codepen.io/juliemoynat/pen/NWRdvQe).

I don't know why but some noscript elements are actually not displayed.

juliemoynat avatar Dec 13 '20 11:12 juliemoynat

I see the bug now! I've updated my test file on https://pacassi.ch/test.html and can reproduce the bug. The section to convert <noscript> tags to <div> tags is in this file: https://github.com/dpacassi/disable-javascript/blob/master/background/content.js

If anyone can fix the issue, I'd gladly accept any pull request! Not sure when I'll have the time to have a look at it.

dpacassi avatar Dec 15 '20 15:12 dpacassi

Hi,

Here is my pull request, which fixes the issue: #100

searosin avatar Mar 01 '22 16:03 searosin