Saturday, 22 February 2025

[netsurf-users] DuckDuckGo as default search engine

Now that "google no longer operates at all without extensive
javascript support" Netsurf 6789 attempts to change the default search
engine to DuckDuckGo, as embedded in the welcome page.

https://ci.netsurf-browser.org/jenkins/job/netsurf/6789/changes

It doesn't quite work here. A search errors with, "Error occurred
fetching page", and this in the URL bar :-

about:websearch?q=elephant

Specifying https://html.duckduckgo.com/html explicitly in
welcome.html, rather than about:websearch does allow the search to
work.

--
David Pitt

Thursday, 20 February 2025

[netsurf-dev] import node and owner

Hello,

I'm trying to implement replaceWith.
Code like this:

dom_node *el; // current node to be replaced
dom_node *new_child; // from other document
dom_node *imported_node;

dom_document *doc;

exc = dom_node_get_owner_document(el, &doc);
if (exc != DOM_NO_ERR) {
fprintf(stderr, "!doc\n");
fprintf(stderr, "exc=%d\n", exc);
return;
}

exc = dom_node_import_node(doc, new_child, true, &imported_node);
if (exc != DOM_NO_ERR) {
fprintf(stderr, "!imported\n");
fprintf(stderr, "exc=%d\n", exc);
return;
}

dom_node *parent = NULL;
exc = dom_node_get_parent_node(el, &parent);

if (exc != DOM_NO_ERR) {
fprintf(stderr, "!parent\n");
fprintf(stderr, "exc=%d\n", exc);
return;
}
dom_node *res = NULL;
exc = dom_node_replace_child(parent, imported_node, el, &res);

if (exc != DOM_NO_ERR) {
fprintf(stderr, "!replace\n");
fprintf(stderr, "exc=%d\n", exc);
return;
}

I tried various combinations, but the last exc is 4.

In code of libdom there is the dom_node_set_owner macro, but it is never called.
Is there a trick to make it work?
Or could you confirm that, there is a bug in the libdom library?
How to fix it?

Regards,
Witold Filipczyk

Sunday, 9 February 2025

[netsurf-users] Re: Google search

On 9 Feb 2025 as I do recall,
Paul Stewart wrote:

> Not sure if it is JS related or CSS, but be good for the menu bar along
> the top of google.com/uk page to display. You can see it is there by
> hovering the mouse pointer over it, but if you were not aware of it you
> would be none the wiser.
>

It's CSS-related (or at least it becomes visible when CSS is disabled).


--
Harriet Bazley == Loyaulte me lie ==

Those who neglect the past do not deserve the future.

[netsurf-users] Re: Google search

In message <df0c89ec5b.harriet@bazleyfamily.co.uk>
Harriet Bazley <lists@bazleyfamily.co.uk> wrote:

> I get the impression that all these work until they 'notice you' (i.e.
> run a randomized check on your particular query), after which your
> browser agent/IP address go onto a block list. But that's probably
> paranoid. :-(

> Anyway, trying a new combination works for a while but then always ends
> up blocked... and it doesn't appear to be anything to do with the actual
> abilities of the browser, with the possible exception of the 'blank
> page' result, which I assume to be the site using JavaScript to throw up
> some kind of interactive 'are you a bot' test.

It will be good when NetSurf gets a more functional version of Javascript.

Not sure if it is JS related or CSS, but be good for the menu bar along
the top of google.com/uk page to display. You can see it is there by
hovering the mouse pointer over it, but if you were not aware of it you
would be none the wiser.

--
Paul Stewart Sent from A9home running RISC OS 4.42

[netsurf-users] Re: Google search

On 9 Feb 2025 as I do recall,
Paul Stewart wrote:

> In message <5bec81139cjohn@jaharrison.me.uk>
> John Harrison <john@jaharrison.me.uk> wrote:
>
> > In article <911372ec5b.phorefaux@a9home.lan>,
> > Paul Stewart <dmarc-noreply@freelists.org> wrote:
> >>> The URL of the search that worked was:
>
> >>> http://www.google.com/search?hl=en-GB&source=hp&biw=&bih=&q=fred&btnG=Goog
> >>> le+Search&iflsig=ACkRmUkAAAAAZ5-R19mlrKh1xYmpEN0bFHEzGVRCegvD&gbv=1
>
> >> When I try that URL I get the "Enable JavaScript to use search" page
> >> from Google.
>
> > What happens if you enable JS?
>
> It does indeed work. However searching from google.co.uk does not. Just
> generates a blank page.

Yes, that's what I'm getting at the moment.

>
> However, rather interestingly, searching from google.com does work with JS
> enabled.
>
I get the impression that all these work until they 'notice you' (i.e.
run a randomized check on your particular query), after which your
browser agent/IP address go onto a block list. But that's probably
paranoid. :-(

Anyway, trying a new combination works for a while but then always ends
up blocked... and it doesn't appear to be anything to do with the actual
abilities of the browser, with the possible exception of the 'blank
page' result, which I assume to be the site using JavaScript to throw up
some kind of interactive 'are you a bot' test.

--
Harriet Bazley == Loyaulte me lie ==

St George for England - St Pancras for Scotland

[netsurf-users] Re: Google search

In message <a84fade15b.harriet@bazleyfamily.co.uk>
Harriet Bazley <lists@bazleyfamily.co.uk> wrote:

> Google.co.uk appears to have permanently disabled search results without
> JavaScript, after intermittent blocks:
> https://news.ycombinator.com/item?id=42719865

> They don't currently appear to be doing anything than testing whether JS
> is enabled in the browser, rather than actually using it to manipulate
> the results display, because simply switching JS on in Netsurf produces
> the same listings as before (whereas it has no effect on most 'requires
> JavaScript' sites beyond slowing down the rendering of the page).

> DuckDuckGo displays a completely blank page with nothing in it but a
> text icon, which appears to work for searching with JS both on and off,
> but is not reassuring....

Searchy by Andrew Poole appears to work okay with Google still. Just have
to make sure you have JS switched on in NS.


--
Paul Stewart Sent from A9home running RISC OS 4.42

[netsurf-users] Re: Google search

In message <5bec81139cjohn@jaharrison.me.uk>
John Harrison <john@jaharrison.me.uk> wrote:

> In article <911372ec5b.phorefaux@a9home.lan>,
> Paul Stewart <dmarc-noreply@freelists.org> wrote:
>>> The URL of the search that worked was:

>>> http://www.google.com/search?hl=en-GB&source=hp&biw=&bih=&q=fred&btnG=Goog
>>> le+Search&iflsig=ACkRmUkAAAAAZ5-R19mlrKh1xYmpEN0bFHEzGVRCegvD&gbv=1

>> When I try that URL I get the "Enable JavaScript to use search" page
>> from Google.

> What happens if you enable JS?

It does indeed work. However searching from google.co.uk does not. Just
generates a blank page.

However, rather interestingly, searching from google.com does work with JS
enabled.

--
Paul Stewart Sent from A9home running RISC OS 4.42