dpacassi / disable-javascript

Adds the ability to disable JavaScript on specific sites.
MIT License
272 stars 33 forks source link

JavaScript enabled but the first time website reports that it is disabled #37

Closed cgiovanni closed 6 years ago

cgiovanni commented 6 years ago

Hello.

it happens that when I click on one of my Firefox bookmarks and I open the website on a new tab then website says that JavaScript is disabled (but Javascript works).

Please take a look at the following example from Braintree website: http://www.awesomescreenshot.com/image/3617104/9773eacd52bc1c11e7002d7de99591da

However javascript works correctly and I can login into Braintree successfully. If I refresh the page without logging in then "you need javascript enabled to use this application" message disappears.

It is not a critical issue because website works fine despite the message displayed on screen... Just wanted to tell you about that. :-)

Thank you and have a nice day

3ventic commented 6 years ago

I'm also seeing this happen, particularly when reopening the browser (and the browser restoring my previous session).

A minimal repro via https://r.3v.fi/script.html:

<!DOCTYPE html>
<div id="js">
        <noscript>Javascript IS NOT enabled</noscript>
</div>
<script>
        let el = document.createElement('span');
        el.textContent = 'Javascript IS enabled';
        document.getElementById('js').appendChild(el);
</script>

results in Javascript IS NOT enabled. Javascript IS enabled when reopening the browser or opening the URL in a new tab.

It's very noticeable on Gmail, where the noscript is a large banner at the top of the page.

Using Disable JavaScript v2.3.0 on Firefox 63.0b7 on Windows 10 1803 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0).

This is the only addon enabled.

dpacassi commented 6 years ago

@cgiovanni That's weird, I see the bug in your screenshot but I can not reproduce it. Neither on Mac nor on Windows. Could you please specify which browser and browser version you are using? Also, a screenshot of your Disable JavaScript settings would be nice.

@3ventic I can't reproduce your bug either. The repro page always works for me correctly, also when reopening the browser. Could you please provide me the same details? (browser, version, screenshot of settings). Also, the exact steps on how to reproduce the bug, e.g.

  1. Start Firefox
  2. Go to this GitHub issue page
  3. Right click on the https://r.3v.fi/script.html link and open it in a new tab
3ventic commented 6 years ago

image

Settings. The domain r.3v.fi is in the list of allowed domains, subdomains NOT included (unsure if the latter matters).

Repro steps:

  1. disable js by default
  2. add r.3v.fi to the domain list in settings
  3. restart firefox (I'm not sure if this is required, but guarantees same conditions as mine)
  4. open https://r.3v.fi/script.html in a new tab (type in the URL bar)

Alternative to step 4. is to open this issue and open the link in a new tab.

Latest stable windows 10 pro, firefox 63.0b7, disable javascript 2.3.0.

dpacassi commented 6 years ago

Thanks a lot for your help @3ventic, I'm now able to reproduce the bug! Working on the issue and hope to publish a release this weekend. Will keep you updated!

dpacassi commented 6 years ago

@cgiovanni @3ventic I've just published version 2.3.1, it might take up to one day for your browsers to update the extension. Let me know if you experience any issues after the update!

3ventic commented 6 years ago

Seems to work, thanks!

cgiovanni commented 5 years ago

Hello @dpacassi,

I am sorry for my late reply. :-(

I am happy that the issue was fixed: I confirm that now it works fine on Firefox 62.0.3 64bit. Windows is my OS.

Thanks for your work and have a nice day.