搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

editing search engine

more options

Hi I want to edit an existing search engine to change the url. To do so, i managed to extract the "search.json.mozlz4" via python-lz4 with a script from SuperUser https://superuser.com/questions/1269805/how-to-edit-search-engines-in-firefox-quantum

I changed the url and removed Amazon, eBay and Twitter (why are they there, i removed them in the settings?) and compressed it again. If i add the newly created "search.json.mozlz4" to the profile, the search engines are resetted to default. So i have a few questions: - There is a "hash" and a "visibleDefaultEnginesHash". Are they related to the "buildID"? - Is mozlz4 a customized version of the lz4 compression algorythm or the defult one? And last but not least: - If t is impossible to edit an existing search engine, is there a way to create a local one, without publishing it on addons.mozilla?

I know, Mozilla has some income about paid default search engines. But why making it so difficult to customize them? And no, downloading a engine as an addon i don't count as 'customizing'.

Hi I want to edit an existing search engine to change the url. To do so, i managed to extract the "search.json.mozlz4" via python-lz4 with a script from SuperUser https://superuser.com/questions/1269805/how-to-edit-search-engines-in-firefox-quantum I changed the url and removed Amazon, eBay and Twitter (why are they there, i removed them in the settings?) and compressed it again. If i add the newly created "search.json.mozlz4" to the profile, the search engines are resetted to default. So i have a few questions: - There is a "hash" and a "visibleDefaultEnginesHash". Are they related to the "buildID"? - Is mozlz4 a customized version of the lz4 compression algorythm or the defult one? And last but not least: - If t is impossible to edit an existing search engine, is there a way to create a local one, without publishing it on addons.mozilla? I know, Mozilla has some income about paid default search engines. But why making it so difficult to customize them? And no, downloading a engine as an addon i don't count as 'customizing'.

被選擇的解決方法

For testing purposes, what if you start by making only one change:

  • Decompress the .mozlz4 file to JSON
  • Edit the "_urls":[] array of the engine you want to modify with the updated path or parameters
  • Compress the JSON back to .mozlz4

Does that file work?

If not, there may be a problem with the compression method.

When you use the Remove button on the Preferences page search panel, Firefox assigns hidden=true to that search engine plugin. For example, you'll see this:

"_metaData":{"order":5,"hidden": true}

That doesn't touch the visibleDefaultEngines property (or its corresponding hash).

從原來的回覆中察看解決方案 👍 0

所有回覆 (3)

more options

選擇的解決方法

For testing purposes, what if you start by making only one change:

  • Decompress the .mozlz4 file to JSON
  • Edit the "_urls":[] array of the engine you want to modify with the updated path or parameters
  • Compress the JSON back to .mozlz4

Does that file work?

If not, there may be a problem with the compression method.

When you use the Remove button on the Preferences page search panel, Firefox assigns hidden=true to that search engine plugin. For example, you'll see this:

"_metaData":{"order":5,"hidden": true}

That doesn't touch the visibleDefaultEngines property (or its corresponding hash).

more options

Thanks, that makes sense. It worked! So if i make that file read-only, amazon & co. dont show up again after the next update?

And sorry; i formatted the text nicely but it didn't kept it...

more options

I've never tried making the file read-only. You probably should back it up somewhere just in case that doesn't protect it.