minbrowser / min

A fast, minimal browser that protects your privacy
https://minbrowser.org/
Apache License 2.0
7.71k stars 684 forks source link

Default DuckDuckGo search engine returns no results if "Block Scripts" is checked #2382

Closed acidus99 closed 4 months ago

acidus99 commented 5 months ago

Min's default search engine is DuckDuckGo. DuckDuckGo appears to require JavaScript. If you use Min with "Block Scripts" checked, it returns no search results, as shown in the video below:

min

Expected Behavior

When "Block Scripts" is checked, the default search provider (DuckDuckGo) should return results.

Actual Behavior

When "Block Scripts" is checked, the default search provider (DuckDuckGo) does not return results, as shown in the video above. The develop

To Reproduce

image

Suggestions

DuckDuckGo does have an non-JavaScript version available at:

https://html.duckduckgo.com/html/

You can work around this issue configuring a Custom search engine and using the config URL:

https://html.duckduckgo.com/html/?q=%s

You can see that working in the video below:

Please consider these options:

PalmerAL commented 5 months ago

Use the non-JS version of DuckDuckGo (and other search engines) automatically, based on the value of the "Disable Scripts" checkbox

Oh I like this idea!


A bit off topic, but do you find this setting useful? I've been wondering if anyone actually uses it; extensions like noscript let you make exceptions so that you can get important sites to work, but we just have a global on/off switch. Is the browser still usable for you with this setting applying to every site?

acidus99 commented 5 months ago

I do like it, but I only just started using Min.

acidus99 commented 5 months ago

BTW I checked the included search engines to see what worked with "Block Scripts" checked:

PalmerAL commented 4 months ago

I looked into this, and this turned out to be because we were filtering scripts at the network level, which wasn't blocking inline scripts or allowing <noscript> tags to run.

I have a fix for this here: https://github.com/minbrowser/min/tree/better-js-filtering

As a consequence, DDG will now detect when JS is disabled and redirect to the HTML site.

Would you be willing to test the branch above? Following these instructions: https://github.com/minbrowser/min/tree/better-js-filtering, but with a git checkout better-js-filtering beforehand.