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

Import Search Engines #197

Open
2 tasks done
hartontw opened this issue Sep 10, 2023 · 0 comments
Open
2 tasks done

Import Search Engines #197

hartontw opened this issue Sep 10, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@hartontw
Copy link

The issue is already reported or known issue?

  • I have searched the existing issues on github
  • I am using the latest version

Description

Hello, congrats for your useful addon.

I'm wondering if is possible to import native Firefox search engines into addon preferences.

imagen

{
  "search": {
    "default": "g",
    "engines": {
      "g": "https://google.com/search?q={}",
      "duck": "https://duckduckgo.com/?q={}",
      "br": "https://search.brave.com/search?q={}",
      "xng": "https://searx.tiekoetter.com/search?q={}",
      "yt": "https://www.youtube.com/results?search_query={}"
    }
  }
}

I did some research and that info is in the file search.json.mozlz4 of the user config directory.

That file can be decompress to json with some script like this
Remove or Comment line 30: Cu.import("resource://gre/modules/osfile.jsm");

Once decompressed looks like this:

{
    "version": 9,
    "engines": [
        {
            "id": "[email protected]",
            "_name": "Google",
            "_isAppProvided": true,
            "_metaData": {
                "order": 1,
                "alias": ".g",
                "hideOneOffButton": false
            }
        },
        {
            "id": "[email protected]",
            "_name": "Wikipedia (en)",
            "_isAppProvided": true,
            "_metaData": {
                "hideOneOffButton": false
            }
        },
        ...
    ],
    "metaData": {
        ...
    }
}

If I have some time I will try to do it myself and make a pull request (if is possible and you are agree), if not I will just simply create an exportation script and post it here.

I mainly created this request to propose the idea and as a self reminder.

Other details

No response

@hartontw hartontw added the enhancement New feature or request label Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant