X
點擊此處開啟此網站的行動版。

技術支援討論區

Verify custom search plugin parameters are used after installing a plugin

已張貼

1st, I'm using Fx 52.8.0 ESR in Linux. I've created custom search engine plugins before, but http://mycroftproject.com/submitos.html - with a template to create a plugin & "test it" has changed some terms, requirements on their site (it seems).

In fact, the plugin - used from Fx search bar, brings an empty DDG page (even allowing scripts, cookies). Something the Mycroftproject template accepted is obviously not right.

I created one for DuckDuckGo using 8 or 10 custom parameters from DDG's "customize settings" page. Mycroft Project has lots of custom DDG plugins already posted, but I'd like to learn how to do it quickly for numerous sites.

I used "show full instructions." Under Search URL, I entered the domain & the custom parameters: https://duckduckgo.com/?kn=1 [example is shortened]. Other than using a script - I stored somewhere - to open the archive, ~/.mozilla/firefox/{profile name}/search.json.mozlz4, I don't see a way to check if a search plugin is using the correct parameters.

Plugin created on MycroftProject isn't working: If I do a DDG search from the search bar, the results page is blank (not even an empty search box). Can someone post a link to a complete example for DDG, that uses complete sentences & actual values, unless DDG or the Mycroft plugin creator wants symbolic entries like "{searchTerms}?"

If I open a DDG page using the bookmark w/ parameters - that DDG created, then a search from their search box works. It's apparently not what OpenSearch wants.

Either way, opening a DDG page with their bookmark, if I click their settings link, that page opens showing all default parameters, not my custom ones that are showing in the URL bar.

    • Isn't there an easier way to see the parameters used - especially if the plugin DOES work?

Another issue: When creating the plugin, http://mycroftproject.com/submitos.html showed an error: "No {searchTerms} parameter found. (case sensitive)" Where (all) are they expecting that? After all custom parameters? Are they wanting the actual symbolic {searchTerms} - entered where? Read several sites about using the Mycroft template - I decided to enter "{searchTerms}" under "Post Parameters." It shut up, but the plugin didn't work.

Note: One DDG, parameters like kn=1, are the same for Get or Post method, except the parameter instructing to use Get or Post. I'm not sure what they want under Post Parameters. DDG supports Post.

Image not used: Mycroft plugin creator asked for an image or icon. Mentioned 16x16 - maybe for an icon, but I uploaded a 16x16 png. When plugin is created, it uses Mycroft's site icon, not the DDG I uploaded. Maybe it wants images w/o square backgrounds?

1st, I'm using Fx 52.8.0 ESR in Linux. I've created custom search engine plugins before, but http://mycroftproject.com/submitos.html - with a template to create a plugin & "test it" has changed some terms, requirements on their site (it seems). In fact, the plugin - used from Fx search bar, brings an empty DDG page (even allowing scripts, cookies). Something the Mycroftproject template accepted is obviously not right. I created one for DuckDuckGo using 8 or 10 custom parameters from DDG's "customize settings" page. Mycroft Project has lots of custom DDG plugins already posted, but I'd like to learn how to do it quickly for numerous sites. I used "show full instructions." Under Search URL, I entered the domain & the custom parameters: https://duckduckgo.com/?kn=1 [example is shortened]. Other than using a script - I stored somewhere - to open the archive, ~/.mozilla/firefox/{profile name}/search.json.mozlz4, I don't see a way to check if a search plugin is using the correct parameters. Plugin created on MycroftProject isn't working: If I do a DDG search from the search bar, the results page is blank (not even an empty search box). Can someone post a link to a complete example for DDG, that uses complete sentences & actual values, unless DDG or the Mycroft plugin creator wants symbolic entries like "{searchTerms}?" If I open a DDG page using the bookmark w/ parameters - that DDG created, then a search from their search box works. It's apparently not what OpenSearch wants. Either way, opening a DDG page with their bookmark, if I click their settings link, that page opens showing all <strong>default parameters,</strong> not my custom ones that are showing in the URL bar. ** Isn't there an easier way to see the parameters used - especially if the plugin DOES work? Another issue: When creating the plugin, http://mycroftproject.com/submitos.html showed an error: "No {searchTerms} parameter found. (case sensitive)" Where (all) are they expecting that? After all custom parameters? Are they wanting the actual symbolic {searchTerms} - entered where? Read several sites about using the Mycroft template - I decided to enter "{searchTerms}" under "Post Parameters." It shut up, but the plugin didn't work. Note: One DDG, parameters like kn=1, are the same for Get or Post method, except the parameter instructing to use Get or Post. I'm not sure what they want under Post Parameters. DDG supports Post. Image not used: Mycroft plugin creator asked for an image or icon. Mentioned 16x16 - maybe for an icon, but I uploaded a 16x16 png. When plugin is created, it uses Mycroft's site icon, not the DDG I uploaded. Maybe it wants images w/o square backgrounds?

由 Joebt 於 修改

額外的系統細節

應用程式

  • User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:34.0) Gecko/20100101 Firefox/56.0

更多資訊

Shadow110 1072 個解決方法 14836 個答案
Hi, unfortunately that is way above my pay grade (free) Volunteer Support. Your best bet is to follow the info and the URL's : *https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Your_first_WebExtension *https://developer.mozilla.org/en-US/Add-ons *https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Setting_up_extension_development_environment *https://hacks.mozilla.org/2015/09/lets_write_a_webextension/ *https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Package_your_extension_ *https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Temporary_Installation_in_Firefox Google into github with search parameters *https://stackoverflow.com/ G'luck. Please let us know if this solved your issue or if need further assistance.
jscher2000
  • Top 10 Contributor
8690 個解決方法 71037 個答案

Hi Joebt, when you use a GET request, all the parameters are in the address bar.

When you use POST, you need to check the parameters another way. It is probably easiest to open Firefox Network Monitor first, then run the search, then you can use the parameters panel.

To open the Network Monitor it the lower part of the tab, you can use either:

  • "3-bar" menu button > Web Developer > Network
  • (menu bar) Tools > Web Developer > Network
  • (Windows) Ctrl+Shift+e

When you submit either a GET or POST request, it will appear as the first line in the Network Monitor. When you click the line, a panel will open on the right, which usually shows request/response headers, but could be one of the others. Look at the Params panel.

Can you find the expected parameters?


Regarding the submitos page, try starting from 44188 as your base (enter that as the existing search plugin and click Load), and modify from there.

In the POST parameters, you'll need to add what you want to customize (for example, I actually do not know what parameters work):

q={searchTerms}&a=0&b=1

Change the Reference line to something new before saving.

Hi Joebt, when you use a GET request, all the parameters are in the address bar. When you use POST, you need to check the parameters another way. It is probably easiest to open Firefox Network Monitor first, then run the search, then you can use the parameters panel. To open the Network Monitor it the lower part of the tab, you can use either: * "3-bar" menu button > Web Developer > Network * (menu bar) Tools > Web Developer > Network * (Windows) Ctrl+Shift+e When you submit either a GET or POST request, it will appear as the first line in the Network Monitor. When you click the line, a panel will open on the right, which usually shows request/response headers, but could be one of the others. Look at the Params panel. Can you find the expected parameters? ---- Regarding the submitos page, try starting from '''44188''' as your base (enter that as the existing search plugin and click Load), and modify from there. In the POST parameters, you'll need to add what you want to customize (for example, I actually do not know what parameters work): q={searchTerms}'''&a=0&b=1''' Change the Reference line to something new before saving.