Giter Club home page Giter Club logo

duckduckgo-lite-search's People

Contributors

andis-sprinkis avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

duckduckgo-lite-search's Issues

POST params aren't passed when initiating search from a Multi-Account Container that doesn't allow the search URL

Sorry for the long report, but this need some background:

I use Firefox Multi-Account Containers. Individual containers have a setting called Limit to designated sites, which means any addresses not assigned to that container will open in a new, non-container tab (or the different container they're assigned to, if any).

For example, I have a GitHub container, that only allows github.com addresses. While on a GitHub container tab, if I click any links or type any address that isn't github.com, it will open in a new non-container tab. However, if I type a search term and search DDG Lite using this add-on from such a container, a new tab opens with the address https://lite.duckduckgo.com/lite/, but it seems like the search query isn't passed.

(This add-on works fine from containers where Limit to designated sites is disabled—the search would simply open in the current container tab.)

I believe this is mozilla/multi-account-containers#1886, but there is a possible workaround on the search add-on's side, which is why I'm opening an issue here.

Workaround

I only tested briefly, but it seems like putting the search terms in the URL instead of POST works in the above situation:

--- manifest.json
+++ manifest.json
@@ -14,8 +14,7 @@
     "chrome_settings_overrides": {
         "search_provider": {
             "name": "DuckDuckGo Lite",
-            "search_url": "https://lite.duckduckgo.com/lite/",
-            "search_url_post_params": "q={searchTerms}",
+            "search_url": "https://lite.duckduckgo.com/lite/?q={searchTerms}",
             "keyword": "ddg",
             "favicon_url": "https://duckduckgo.com/favicon.ico",
             "is_default": true,

The drawback is that search queries would be visible in the browser history, which might not be desirable to you or existing users.

If you're ok with it, I'll do a PR (after a bit more testing). Or if you have any other ideas on how to solve this problem. I'm not familiar with WebExtension so I might be missing something—maybe providing 2 different search options from one add-on is possible? one POST, one URL. Worst case, it could be a separate add-on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.