uBlock Origin - redirecting back to Google search results Topic is solved

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

uBlock Origin - redirecting back to Google search results

Unread post by UCyborg » 2022-05-29, 23:06

I don't know how old this behavior is, but it's easily reproducible on a fresh profile with latest PM 31 and legacy uBlock Origin 1.16.4.30. Install the extension and add the following rules in its settings on My rules tab:

Code: Select all

no-scripting: * true
no-scripting: google.com false
This disables JavaScript everywhere except on Google. Perform a search on Google and click any result, it will redirect back to Google instead of opening the page. But, if you also have the rule for the website you're opening via search results for allowing JS, then the website will open normally.

I also noticed the issue is not present with the same uBlock Origin version on SeaMonkey 2.53.12, the website opens even if JS is not allowed on it, which is the expected behavior.

Any idea whether this is an extension issue or a browser issue and what could be done to fix it?

User avatar
karlchen
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2019-01-16, 15:55

Re: uBlock Origin - redirecting back to Google search results

Unread post by karlchen » 2022-05-30, 08:10

Hello, UCyborg.

Try reverting the order of the rules: exception first, general rule second:

Code: Select all

no-scripting: google.com false
no-scripting: * true
HTH,
Karl

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: uBlock Origin - redirecting back to Google search results

Unread post by UCyborg » 2022-05-30, 16:46

You don't really have full control over the order in the GUI, probably only by deleting everything, save, add exception rules, save and then add the main rule and save again.
Even then or if you change the order in the database to make sure it's correct, it doesn't make a difference.

User avatar
andyprough
Astronaut
Astronaut
Posts: 701
Joined: 2020-05-31, 04:33

Re: uBlock Origin - redirecting back to Google search results

Unread post by andyprough » 2022-05-30, 17:08

UCyborg wrote:
2022-05-29, 23:06

Code: Select all

no-scripting: * true
no-scripting: google.com false
This disables JavaScript everywhere except on Google.
Are you hand-writing the rules? I always just clicked the green and red and grey boxes on the gui. If I wanted to disallow js globally but allow it on Google, I'd click the box in the settings to disallow js, and then go to google and click the green global box for google. Or does that just give you the same effect? I haven't used google for a few years and stopped using uBlock in favor of ηMatrix but I can test it on one of my systems if it would help you.

Goodydino
Keeps coming back
Keeps coming back
Posts: 820
Joined: 2017-10-10, 21:20

Re: uBlock Origin - redirecting back to Google search results

Unread post by Goodydino » 2022-05-30, 18:01

Google search does not need javascript. I blocked it. If you block that, you can see that Google redirects every suggestion through themselves in the link before it goes to the proper destination. Downright nosy!

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 938
Joined: 2017-12-14, 12:59

Re: uBlock Origin - redirecting back to Google search results

Unread post by gepus » 2022-05-30, 18:41

@UCyborg
Never used SeaMonkey but according to Wikipedia:
2.53.9 August 26, 2021
Official Version 2.53.9 Built from the same Extended Support Release (ESR) branch as Firefox 60 ESR and Thunderbird 60.
Are you using the same version of uBlockO with SeaMonkey and Pale Moon?

@Goodydino
If you want to get 100+ results for images automatically and have tweaked your google.xml accordingly then scripting must be enabled.

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: uBlock Origin - redirecting back to Google search results

Unread post by UCyborg » 2022-06-01, 19:45

I already wrote that I'm using the exact same version of uBlock Origin in both browsers, same XPI, same checksum. Not sure what the way of adding the rules has to do with the problem at hand, the old NoScript file with exported URL whitelist was converted to uBlock format with some search & replace and removing some now redundant rules and importing it. But I tested the reported scenario on the clean profile with only the added rules mentioned in the OP.

I'm simplifying my digital life and among other things dropping NoScript, though this version of uBlock Origin isn't quite what one would expect. Besides the reported problem in combination with Pale Moon, the settings GUI has the concept of temporary rules, but temporary rules aren't really the thing here as far as I can tell, rules always get stored permanently.

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 938
Joined: 2017-12-14, 12:59

Re: uBlock Origin - redirecting back to Google search results

Unread post by gepus » 2022-06-02, 08:25

UCyborg wrote:
2022-06-01, 19:45
I already wrote that I'm using the exact same version of uBlock Origin in both browsers, same XPI, same checksum.
I asked because Seamonkey is based on Firefox 60 ESR. Never mind.

As for your issue, it works perfectly for me. Tested with Pale Moon 31.0.0 on a fresh profile except for uBlock Origin being installed.

Code: Select all

no-scripting: * true
no-scripting: www.google.com false

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: uBlock Origin - redirecting back to Google search results

Unread post by UCyborg » 2022-06-02, 17:42

Well I can't get it working no matter what. I suspect the workaround could be removing the click event attached on each link, though I'm not sure how to go about modifying the original script...looks messy. Dragging the link to URL bar works normally.

I didn't say how it actually happens; It momentarily shows the page saying to click here if you're not redirected automatically then goes back to results page.

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 938
Joined: 2017-12-14, 12:59

Re: uBlock Origin - redirecting back to Google search results

Unread post by gepus » 2022-06-02, 20:47

UCyborg wrote:
2022-06-02, 17:42
I didn't say how it actually happens;
No, this is what you said:
UCyborg wrote:
2022-05-29, 23:06
I don't know how old this behavior is, but it's easily reproducible on a fresh profile with latest PM 31 and legacy uBlock Origin 1.16.4.30. Install the extension and ...
Next time before asking for help do first the steps you suggest for others to do yourselves!

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: uBlock Origin - redirecting back to Google search results

Unread post by UCyborg » 2022-06-03, 16:24

I did describe the situation / steps shortly and concisely, I only left out a minor detail (as it seemed irrelevant in the grand scheme of things)...the redirection (the main thing) would be obvious regardless of whether the text saying "click here if you're not redirected" shows up or not.

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 938
Joined: 2017-12-14, 12:59

Re: uBlock Origin - redirecting back to Google search results

Unread post by gepus » 2022-06-03, 17:46

@UCyborg
What you did was to mislead anybody willing to help!
Once you suggest to test with a fresh profile only with uBlockO v1.16.4.30 installed, one can assume that you did and it didn't work for you.
Fact is that (out of laziness?) you didn't bother to test yourselves otherwise you would have noticed that it works. Period.

That it doesn't work with some script added by you is a totally different issue not related neither to Pale Moon nor to uBlockO 1.16.4.30.

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: uBlock Origin - redirecting back to Google search results

Unread post by UCyborg » 2022-06-04, 04:56

I never said I added any scripts, I merely suggested that modifying JavaScript served by Google in a way that would remove the event attached to the links could be a viable workaround if it could be realized somehow. AFAIK, scripts exist that could remove such baggage from Google search in the past, though what I found is outdated. And implementing an extension that does search and replace on JS served by sites is a possibility, in fact, such extension already exists (Pale Moon Web Technologies Polyfill Add-On).

Anyway, all of my testing being done on a clean profile is on the video. What I didn't test the first time, running palemoon.exe on a single CPU core actually improves the chances of it working correctly significantly.

As for you, gepus, I suggest you kindly back off of this thread unless you have some constructive/useful advice.

Edit: Interesting, affinity doesn't seem to have any effect on the behavior on the Linux version, it's always broken. Currently still on GTK3 version 29.4.4 there (shouldn't matter anyway). I could reproduce the problem on Firefox 52.9 ESR as well (only tried on Windows).

Do my PC specs matter? The important stuff: AMD Phenom II X4 920, 4 GB of RAM, NVIDIA GeForce GTX 750 Ti, different GPU drivers on different platforms. Virtual machine with Windows 11 where the was video recorded obviously has virtual graphics card, Pale Moon has its driver blacklisted. Issue also reproducible on the host with Windows 10, where hardware acceleration works, likewise with Kubuntu 21.10. Drivers version 4xx.xx something...will check if necessary...shouldn't really matter, should it?

PS: Virtual machine had only 1,5 GB of RAM, hence occasional hang.

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 938
Joined: 2017-12-14, 12:59

Re: uBlock Origin - redirecting back to Google search results

Unread post by gepus » 2022-06-04, 08:32

UCyborg wrote:
2022-06-04, 04:56
I never said I added any scripts, ...
Either short of memory or a troll or both:
UCyborg wrote:
2022-06-02, 17:42
I suspect the workaround could be removing the click event attached on each link, though I'm not sure how to go about modifying the original script...looks messy.
More soap bubbles:
UCyborg wrote:
2022-06-04, 04:56
Anyway, all of my testing being done on a clean profile is on the video.
You can spare your videos. On a clean profile Pale Moon and uBlockO are working as expected. Period.
UCyborg wrote:
2022-06-04, 04:56
As for you, gepus, I suggest you kindly back off of this thread unless you have some constructive/useful advice.
Be assured, I won't feed such a troll any longer.

User avatar
andyprough
Astronaut
Astronaut
Posts: 701
Joined: 2020-05-31, 04:33

Re: uBlock Origin - redirecting back to Google search results

Unread post by andyprough » 2022-06-04, 12:10

UCyborg wrote:
2022-06-02, 17:42
Well I can't get it working no matter what.
Wish I could help, but I moved onto ηMatrix and am tired of messing with uBlock's rules for now. ηMatrix being actively maintained and targeting Pale Moon specifically gives me a better overall experience.

One thing I did do before moving to ηMatrix is I tried the git version of uBlock legacy: viewtopic.php?f=46&t=28149&p=226376#p226376
There are a couple of fixes in the git version that have not made it into a full release yet - perhaps they would be helpful to you.

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: uBlock Origin - redirecting back to Google search results

Unread post by UCyborg » 2022-06-04, 15:18

Managed to build it from repo, now got the extra tab with keyboard shortcuts. :) But yes, nothing new related to the issue I'm experiencing. I suspect it does something in a way that doesn't play nice with this browser, but does with SeaMonkey. FWIW, I also got the issue on the latest Waterfox Classic.

Since not many are responding to the issue, I wonder if it's possible Google serves different JS based on geolocation or something and someone else might not encounter it while another person may. Right, I'm always logged off Google account, haven't checked yet whether there's a difference when logged in.

User avatar
andyprough
Astronaut
Astronaut
Posts: 701
Joined: 2020-05-31, 04:33

Re: uBlock Origin - redirecting back to Google search results

Unread post by andyprough » 2022-06-04, 17:26

UCyborg wrote:
2022-06-04, 15:18
Managed to build it from repo, now got the extra tab with keyboard shortcuts. :) But yes, nothing new related to the issue I'm experiencing. I suspect it does something in a way that doesn't play nice with this browser, but does with SeaMonkey. FWIW, I also got the issue on the latest Waterfox Classic.

Since not many are responding to the issue, I wonder if it's possible Google serves different JS based on geolocation or something and someone else might not encounter it while another person may. Right, I'm always logged off Google account, haven't checked yet whether there's a difference when logged in.
I tried it on Pale Moon just now, and I get the same behavior you noted. And it does work in Seamonkey, which is strange.

The way to allow it to pass the link through, I found, is to add google.com to the 'Trusted sites' tab on the uBlock settings. Have you tried that?

Not that I'd recommend anyone ever consider google to be a trusted site. This was my first time on the google search page in a few years, I noticed it has gotten very messy and busy since the last time I was there. I'll bet a lot of people don't remember that when google search was new, its claim to fame was that it was so clean and light and minimal. Now it looks like performing a facebook search, with all kinds of pictures and videos popping up with each different letter you type.

Anyway - Trusted site seems to resolve it - hope that helps.

User avatar
UCyborg
Fanatic
Fanatic
Posts: 172
Joined: 2019-01-10, 09:37

Re: uBlock Origin - redirecting back to Google search results

Unread post by UCyborg » 2022-06-04, 19:21

Indeed that works (and lets some of the resources through that normally wouldn't be allowed).

The idea of my posting however was that we have a strange bug under not well understood circumstances and we'd probably prefer if these things work correctly.

User avatar
andyprough
Astronaut
Astronaut
Posts: 701
Joined: 2020-05-31, 04:33

Re: uBlock Origin - redirecting back to Google search results

Unread post by andyprough » 2022-06-04, 19:32

UCyborg wrote:
2022-06-04, 19:21
Indeed that works (and lets some of the resources through that normally wouldn't be allowed).

The idea of my posting however was that we have a strange bug under not well understood circumstances and we'd probably prefer if these things work correctly.
You could make a bug report. It would be nice to know if it's really Pale Moon's fault. Google is clearly doing some weird redirect thing that somehow gets interrupted. Sometimes I get a momentary popup message while Google is in the middle of its redirect.

Goodydino
Keeps coming back
Keeps coming back
Posts: 820
Joined: 2017-10-10, 21:20

Re: uBlock Origin - redirecting back to Google search results

Unread post by Goodydino » 2022-06-04, 20:50

gepus wrote:
2022-05-30, 18:41
@Goodydino
If you want to get 100+ results for images automatically and have tweaked your google.xml accordingly then scripting must be enabled.
I am not using Google for searching except for testing it. To search for images, I can use Qwant.

Locked