Rob--W / dont-track-me-google

Firefox and Chrome extensions to prevent Google from making links ugly.
MIT License
459 stars 26 forks source link

Doesn't work with JS disabled #16

Closed dimqua closed 6 years ago

dimqua commented 6 years ago

The addon does not work, when JavaScript is disabled for google.com website.

Can this be fixed?

csagan5 commented 6 years ago

No...

Rob--W commented 6 years ago

No...

@csagan5 Why do you think that this won't be fixed?

I have yet to check whether this bug exists (step to do so would make it easier for me), and then fix it if possible. Patches are welcome too.

dimqua commented 6 years ago

https://google.com/?gbv=1

But you need to disable JS first, before you can reproduce this bug.

csagan5 commented 6 years ago

Sorry guys, I thought this was about disabling Javascript in the browser..

Rob--W commented 6 years ago

Even with JavaScript disabled, the add-on should work. Why do you think that the add-on does not work?

This is the relevant code:

https://github.com/Rob--W/dont-track-me-google/blob/81aad59b86264491754bf05ebf4b51e0867a0377/contentscript.js#L1-L4

The setupAggresiveUglyLinkPreventer function will not be able to run a script in the page when JS is disabled, but the handlePointerPress and handleClick handlers will rewrite the link as soon as you click on a link.

dimqua commented 6 years ago

as soon as you click on a link

That's why the addon actually works, but not as excepted. I'll try to explain:

  1. When JS is turned off I see something like this for all search results;
  2. I click to the first link, for example;
  3. The first link's tooltip is fixed.

I mean tooltips for already visited links are correct.

Rob--W commented 6 years ago

Ok, fixed in 4.17.

csagan5 commented 6 years ago

I found it confusing in this issue the difference between "Google search engine with JS features disabled e.g. as decided by Google servers" vs "I disabled JS in the browser"; I was always thinking we were talking about the latter case, which obviously would disable JS functionality on the DOM