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

[Neat URL] Middle click behavior on Google search #42

Closed
gwarser opened this issue Sep 24, 2017 · 15 comments
Closed

[Neat URL] Middle click behavior on Google search #42

gwarser opened this issue Sep 24, 2017 · 15 comments

Comments

@gwarser
Copy link
Contributor

gwarser commented Sep 24, 2017

Firefox 55 or 58
Neat URL 2.0.4

When I search for something in Google, and then middle click on result to open in new tab, both tabs are redirected to new page.

Example search
https://www.google.pl/search?q=dom.push.enabled&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&dcr=0&gws_rd=cr
https://www.google.com/search?q=dom.push.enabled&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&dcr=0&fg=1

@Smile4ever
Copy link
Owner

Please test this in a clean profile and report back. I don't understand what's happening right now with your explaination, but honestly I cannot believe Neat URL causes this behaviour. Please prove me wrong if you want.

@gwarser
Copy link
Contributor Author

gwarser commented Sep 24, 2017

This was tested on Stable Firefox on clean profile. I tested just now, again, and no change.

  • on Nightly - open about:profiles
  • remove "stable" profile with files
  • create new "stable" profile
  • launch stable Firefox ./firefox -P stable -no-remote (It's run form it's own folder)
  • verify it's clean ("welcome" page, no extension, about:support -> Open directory button opens newly crated profile directory)
  • install Neat URL from about:addons
  • type "webnotifications" in search bar -> enter
  • middle click on first not-ad link "Using the Notifications API - Web APIs | MDN" to open new tab
  • both tabs opens https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API
  • click on Neat URL icon to disable
  • reload page or perform new search
  • middle click have expected behavior

I forgot to add - I'm on Linux Mint 18.2. Maybe this change something?

@gwarser
Copy link
Contributor Author

gwarser commented Sep 24, 2017

This does not apply to all search results. For example for "webnotification", two links to github are ok, but third to developer.mozilla.org is affected.

Probably caused by , ved@google.* - when removed, all seems to be OK.

When I click on affected link, I see in Browser Console that only one URL have ved parameter.

@Smile4ever
Copy link
Owner

I was able to confirm that ved@google.* is indeed the problem. I will investigate the cause and release a new version of Neat URL which contains the fix for this problem.

@Smile4ever
Copy link
Owner

Update: ved@google.* is not the problem. Its the way I handle links to mozilla.org.. I have an idea in my mind on how to solve this. I will keep you updated.

@Smile4ever
Copy link
Owner

Smile4ever commented Sep 24, 2017

35aca5d fixes this issue. It is available in Neat URL 2.0.5 which can be downloaded from addons.mozilla.org. Closing this issue 👍

@gwarser
Copy link
Contributor Author

gwarser commented Sep 26, 2017

Its the way I handle links to mozilla.org.

Why links to mozilla.org are not cleaned?

Example here https://blog.mozilla.org/firefox/introducing-firefox-multi-account-containers/ (The Firefox Multi-Account Containers extension )

I know that webextension addons are not working on addons.mozilla.org, but there should be no problem on blog.mozilla.org. My other extensions work fine here - for example smartUp Gestures.

Edit:
I see that even here (on github) link is not cleaned.

@Smile4ever
Copy link
Owner

It's not the origin URL that matters, it's the target URL. And yes, you're right: addons.mozilla.org is only cleaned on refresh (F5). It's a known issue that needs fixing in Neat URL. Addons.mozilla.org is handled differently because webRequest does not support priviledged domains, so that's probably the cause.

@gwarser
Copy link
Contributor Author

gwarser commented Sep 30, 2017

This bug is back. Additionally when I use left click, I cannot go back - I must click twice on back button to go back.

@Smile4ever Smile4ever reopened this Sep 30, 2017
@Smile4ever
Copy link
Owner

Smile4ever commented Sep 30, 2017

I cannot reproduce this issue using Neat URL 2.1.0. Can you state exactly what you did?

I went to https://www.google.be/search?client=firefox-b&dcr=0&q=contextual+search+addons+src&oq=contextual+search+addons+src
Middle clicked on the first link
The link was cleaned and the current tab was not being changed.

@gwarser
Copy link
Contributor Author

gwarser commented Sep 30, 2017

First one is like in bug report. Middle click on https://addons.mozilla.org/firefox/addon/multi-account-containers/?utm_source=blog.mozilla.org&utm_campaign=firefox_frontier&utm_medium=referral opens link in current and new page.

Second is weird - sometimes is ok, sometimes I end up on blank moz-extension://dbd410de-ad84-45a2-96c9-ee258b5aa54c/_generated_background_page.html, and sometimes something is "one click back" in history, and redirects me "forward". I will test little more.

@gwarser
Copy link
Contributor Author

gwarser commented Sep 30, 2017

edit:

  • on subsequent click on above link new moz-extension tabs are opened, and current tab is redirected to this address. Additionally I see that other, previously opened moz-extensions tabs flashes with "burst animation" (means page finished loading - of course with no reason for this).

I can fix this only by removing and then reinstalling 2.1.0.
No longer true - Worked only when cleanly installed on clean profile - now reinstalation not help.

edit:

Above steps are done on nightly. I just tried on clean stable, and this was broken on first try.

@Smile4ever
Copy link
Owner

Alright, fixed in 2.1.1. Please try that version once it's available on AMO (I've submitted it already, it just needs to be approved).

@gwarser
Copy link
Contributor Author

gwarser commented Sep 30, 2017

No blank page anymore.

I still see sometimes, that current page and new one are redirected to new url.

When I middle click -> wait for new tab to load -> middle click again -> (repeat) -> I can see that two of these newly opened tabs are reloading.

@Smile4ever
Copy link
Owner

If you can reproduce "sometimes" in a reliable way, I'm happy to look at it again. Please open a new issue then.

Smile4ever added a commit that referenced this issue Oct 18, 2017
* Add counter which shows the number of rewritten URLs #60
* Add option to show/hide counter
* Add option to set the counter background color
* Fix addons.mozilla.org logic and change applyAfter to 1000ms #42
* Drop tracking feature introduced in 3.1.0 #58
* Add blacklist feature to skip certain URLs
* Skip rewriting urls which contain ?? #66
* Empty list of request types now means no request types are filtered at all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants