Search Engine Editor

Dedicated board for extension releases/support threads

Moderators: FranklinDM, Lootyhoof

Forum rules
Please do not create new topics here unless you are an extension author in need of a dedicated releases&support thread!
User avatar
_yup_
Moonbather
Moonbather
Posts: 59
Joined: 2025-04-26, 11:45

Re: Search Engine Editor

Post by _yup_ » 2025-07-04, 10:41

Drugwash wrote:
2025-07-04, 09:52
How does one add a search plugin manually from information that is not a web page form or a local file?
Very easy: from any source install any plugin which you do not need, and then edit it :D
Drugwash wrote:
2025-07-04, 09:52
Adding the ability to create a search plugin from scratch in your extension would complete it making the old extension redundant.
I was thinking about this function. The reason why I decided to not implement it is reluctance to clutter the user interface: in browsers where all Search Engine Manager buttons (including "Restore Defaults") are placed in one row, there is almost no room for extra buttons (especially in case of languages with long words and phrases).
Drugwash wrote:
2025-07-04, 09:52
I believe adding a Tools menu item which opens the editor would be enough for that.
Agree. This may be a solution for browsers with horizontal placement. And for vertical placement (as in Pale Moon) I will add a button to the Search Engine Manager window - this location is more logical.

User avatar
Drugwash
Lunatic
Lunatic
Posts: 316
Joined: 2016-01-28, 12:08
Location: Ploieşti, Romania

Re: Search Engine Editor

Post by Drugwash » 2025-07-04, 11:25

_yup_ wrote:
2025-07-04, 10:41
Very easy: from any source install any plugin which you do not need, and then edit it :D
That would require clearing all fields manually, one by one. Not efficient. ;)
_yup_ wrote:
2025-07-04, 10:41
for vertical placement (as in Pale Moon) I will add a button to the Search Engine Manager window
I'm not sure what you mean by vertical placement. :? Here's my Pale Moon, with the current extension menu item. That's what I was referring to - that item would be replaced by yours and would just bring up the editor window with all fields blank.
Might also work in browsers that have a "hamburger" menu button instead of the classic menu.
As mentioned in the screenshot some of us may have a very large engine list making it cumbersome to get to that button, while a menu item would be much easily reachable. Well, just my opinion. ;)
Screenshot from 2025-07-04 14-12-12_edit.png
You do not have the required permissions to view the files attached to this post.

User avatar
_yup_
Moonbather
Moonbather
Posts: 59
Joined: 2025-04-26, 11:45

Re: Search Engine Editor

Post by _yup_ » 2025-07-04, 12:51

Drugwash wrote:
2025-07-04, 11:25
I'm not sure what you mean by vertical placement.
Image
- and the "New Engine" button will be above the "Add Engine".

And horizontal placement:
Image
Note that on this picture there is no free room between the "Restore Default Search Engines" and "Add" buttons already, and nothing can be placed in that gap. Any additional button will make the window wider, while in my localized version it is already almost a screen-wide:
Image
- so I have to set scaling down for screenshots.
Drugwash wrote:
2025-07-04, 11:25
As mentioned in the screenshot some of us may have a very large engine list making it cumbersome to get to that button, while a menu item would be much easily reachable. Well, just my opinion. ;)
Position of a Tools menu item in almost unpredictable, and it is buried somewhere between other items, whereas location of the "Manage Search Engines" is always the same - at the bottom of the engines drop-down list, and thus it is "much easily reachable" ;)

Anyway, for browsers with a dedicated Search Engine Manager window (like Pale Moon) I can do both - a Tools menu item and a button in the window.

User avatar
Drugwash
Lunatic
Lunatic
Posts: 316
Joined: 2016-01-28, 12:08
Location: Ploieşti, Romania

Re: Search Engine Editor

Post by Drugwash » 2025-07-04, 13:22

Ah, now I got it: it's about button order. Yep, makes sense. As a side note, that's why I always refused to use localization in software: some languages have too long - sometimes insanely long - words which would either screw up the GUI (if it's flexible) or just make GUI elements' labels come up truncated and incomprehensible.
_yup_ wrote:
2025-07-04, 12:51
Position of a Tools menu item is almost unpredictable, and it is buried somewhere between other items
If I'm not mistaken there are three sections in the Tools menu and they each may have a dedicated purpose, so it would only be a matter of finding the right section for it (screenshot shows the current item in section 2). Items don't change their place between sessions unless some extensions that also provide menu items have been added or removed. The user would easily remember item's position after one or two usages, I'd assume. ;)
_yup_ wrote:
2025-07-04, 12:51
for browsers with a dedicated Search Engine Manager window (like Pale Moon) I can do both - a Tools menu item and a button in the window.
That would be just about perfect! :thumbup:

User avatar
_yup_
Moonbather
Moonbather
Posts: 59
Joined: 2025-04-26, 11:45

Re: Search Engine Editor

Post by _yup_ » 2025-07-04, 14:02

Drugwash wrote:
2025-07-04, 13:22
If I'm not mistaken there are three sections in the Tools menu and they each may have a dedicated purpose, so it would only be a matter of finding the right section for it
Everything is not so easy, and much easier (simultaneously).

There are no any sections in the menu. Every horizontal line is just a regular menu item.
Any menu item can have an ID, and some of them (belonging to the browser itself) definitely have it. (Sometimes ID of the same menu item is different in different browsers, and this is a headache for developers of multi-browser extensions.)

When an extension wants to add its own menu item, it instructs the browser: "Insert my item right before the item with ID ...", or "Insert my item immediately after the item with ID ...", or "Insert my item at the end of submenu with ID ...". That's all.
Drugwash wrote:
2025-07-04, 13:22
Items don't change their place between sessions unless some extensions that also provide menu items have been added or removed.
This is true, if menu item position is hardcoded somewhere in the extension's files. But extensions also can add their items programmatically - at any time during their execution. And thus the order of items may depends on when exactly they decide to do this.
Drugwash wrote:
2025-07-04, 13:22
The user would easily remember item's position after one or two usages, I'd assume.
Nevertheless, targeting the mouse pointer is much easier when menu item is first or last, then when it is somewhere in-between other similar-looking items.
Of course, color icons do help, but nevertheless...

User avatar
jars_
Lunatic
Lunatic
Posts: 427
Joined: 2016-12-27, 00:12

Re: Search Engine Editor

Post by jars_ » 2025-07-04, 14:20

Never translate the extensions names! I'm looking for a "Search Engine Editor", but it turns out to be at the top, not at the bottom of the list.
+
и как вызвать это расширение? Нет ни кнопки настроек, ни пункта в меню Инструменты, ни в конт.меню - ничего?! А если вытягиваю строку поиска на панель, то там управление перехвачено расширением "Context Search X". Выходит, что не вызвать никак :crazy:
Подскажи код вызова для кнопки CB.
Image

User avatar
Drugwash
Lunatic
Lunatic
Posts: 316
Joined: 2016-01-28, 12:08
Location: Ploieşti, Romania

Re: Search Engine Editor

Post by Drugwash » 2025-07-04, 14:54

_yup_ wrote:
2025-07-04, 14:02
There are no any sections in the menu.
I may be wrong but I do see (with great difficulty due to buggy GTK system theme) two separators in the Tools menu, which I believe might indicate three different sections. Maybe some seasoned extension creator or Moonchild himself could shed some light on this. Nonetheless, it really doesn't matter where exactly the item is positioned as long as it is there. :)
jars_ wrote:
2025-07-04, 14:20
Never translate the extensions names! I'm looking for a "Search Engine Editor", but it turns out to be at the top, not at the bottom of the list.
Ha ha, that was quite funny. :lol: Just mentioned my dislike of localization in software, in the previous message. Well, we all make mistakes here and there, surely it'll be fixed. ;)

User avatar
_yup_
Moonbather
Moonbather
Posts: 59
Joined: 2025-04-26, 11:45

Re: Search Engine Editor

Post by _yup_ » 2025-07-04, 15:46

jars_ wrote:
2025-07-04, 14:20
Never translate the extensions names!
Why not? In my collection a large number of extensions (starting from "Who stole my pictures?") have localized names.
Even Mozilla developers did this for extensions, bundled with their browsers. For example:
DOMi.png
jars_ wrote:
2025-07-04, 14:20
и как вызвать это расширение? Нет ни кнопки настроек, ни пункта в меню Инструменты, ни в конт.меню - ничего?!
Here is the extension's home page: http://yup.lh1.in/AddOns/SearchEngineEditor/index.ru.html - with illustrations and some explanations. (The link also should be in the "Подробнее" page, but somehow I have lost the "http://" part of it here, so browser does not display it.)

Also the same illustrated description is at the start of this thread.

Buttons are in the Search Engine Manager window:
Image
Added menu item is in the context menu of any text input field of any web page:
Image
jars_ wrote:
2025-07-04, 14:20
А если вытягиваю строку поиска на панель, то там управление перехвачено расширением "Context Search X".
I will look at this. But Editor can be launched only from the Search Engine Manager, because it edit the engine which is currently selected in that Manager. Without this selection it has nothing to edit.

I will look, perhaps I will add the possibility to edit the default engine when launching from the Tools menu.
jars_ wrote:
2025-07-04, 14:20
Подскажи код вызова для кнопки CB.
The "Edit" button is embedded into Search Engine Manager window, has ID "editEngineButton" and calls "runEngineEditor()" function without parameters. But see above - this function looks: "Which engine is selected in the Manager?"
If "Context Search X" uses its own window, then the Editor will not work.
Drugwash wrote:
2025-07-04, 14:54
I may be wrong but I do see (with great difficulty due to buggy GTK system theme) two separators in the Tools menu, which I believe might indicate three different sections.
No. Technically, those separators are just a plain menu items. They can be added in any number to any menu, and mean nothing. Their role is only to visually divide a long menu, and nothing more.
And as any other menu items, they can have their unique IDs, so extensions can use them as a base when adding their own menu items ("Insert before", "Insert after").
Drugwash wrote:
2025-07-04, 14:54
Just mentioned my dislike of localization in software
A half of my life i am involved into software localization (including OS/2 and eComStation).
And if jars_ sees a localized name, then he uses a localized version of browser :P
Drugwash wrote:
2025-07-04, 14:54
Well, we all make mistakes here and there, surely it'll be fixed. ;)
I wonder, how one can miss the item which is at the start of the list? :o
You do not have the required permissions to view the files attached to this post.

User avatar
Drugwash
Lunatic
Lunatic
Posts: 316
Joined: 2016-01-28, 12:08
Location: Ploieşti, Romania

Re: Search Engine Editor

Post by Drugwash » 2025-07-04, 16:18

_yup_ wrote:
2025-07-04, 15:46
Technically, those separators are just a plain menu items. They can be added in any number in any menu, and mean nothing.
I know what they are (did a bit of programming in various languages) and I know they must mean something otherwise they wouldn't exist. Usually they're used for separating (thus their name) groups of items that perform similar functions from other groups.
Indeed their IDs could be used as "anchors" for other items, so in this case one can choose where to place their item(s): first section (at top before first separator), second section (anchored to first separator) or third section (anchored to second separator). We're talking about the same thing in different terms. :)
_yup_ wrote:
2025-07-04, 15:46
A half of my life i am involved into software localization
I tried that too, long ago, with Slim Browser and eMule, but in the end I realized it'll never end up right, especially when one is forced to use the official wording set by the OS maker (Microsoft at that time). Now with flexible (auto-expanding) toolkits like GTK a GUI can go awry easily due to translation. So I personally stick to English, it has much shorter words than Romanian. :)
_yup_ wrote:
2025-07-04, 15:46
I wonder, how one can miss the item which is at the start of the list? :o
It's the human brains that betrays us. When we expect something to be in a certain place we subconciously overlook any other place and go directly where we think it should be. ;)

User avatar
_yup_
Moonbather
Moonbather
Posts: 59
Joined: 2025-04-26, 11:45

Re: Search Engine Editor

Post by _yup_ » 2025-07-04, 17:09

Drugwash wrote:
2025-07-04, 16:18
... and I know they must mean something otherwise they wouldn't exist. Usually they're used for separating (thus their name) groups of items that perform similar functions from other groups.
http://udn.realityripple.com/docs/Archive/Mozilla/XUL/menuseparator: "Used to create a separator between menu items. Typically drawn as a thin line."
And they have no any other functions. Only draw a line.
Drugwash wrote:
2025-07-04, 16:18
Indeed their IDs could be used as "anchors" for other items, so in this case one can choose where to place their item(s): first section (at top before first separator), second section (anchored to first separator) or third section (anchored to second separator).
But you can not say to browser: "Put my menu item into second section" - because from the browser POV there are no any sections in the menu.
Instead you must know the ID, and say: "Insert my menu item after the item with that ID". And it is irrelevant, item of what type ("regular" menu item, separator, or submenu) has that ID.
Drugwash wrote:
2025-07-04, 16:18
It's the human brains that betrays us. When we expect something to be in a certain place we subconciously overlook any other place and go directly where we think it should be. ;)
"The user would easily remember item's position after one or two usages" ;)

User avatar
Drugwash
Lunatic
Lunatic
Posts: 316
Joined: 2016-01-28, 12:08
Location: Ploieşti, Romania

Re: Search Engine Editor

Post by Drugwash » 2025-07-04, 17:17

Oh I'm too tired to argue on the separators. Slap that menu item anywhere and I'll be happy. And I will remember where the item is after I would have used it a couple times. :lol:

User avatar
jars_
Lunatic
Lunatic
Posts: 427
Joined: 2016-12-27, 00:12

Re: Search Engine Editor

Post by jars_ » 2025-07-04, 19:34

Ah.. ok i get it. That is, it is necessary that the Search Bar was visible. Ok. :silent:
Thanks that the ContextSearchX has а Setting button. Maybe you could make a button to showing SearchEngines settings window in yours ? Just a suggestion :)
Image
Thanks for extension.

User avatar
_yup_
Moonbather
Moonbather
Posts: 59
Joined: 2025-04-26, 11:45

Re: Search Engine Editor

Post by _yup_ » 2025-07-05, 09:38

jars_ wrote:
2025-07-04, 19:34
Maybe you could make a button to showing SearchEngines settings window in yours ?
jars_ wrote:
2025-07-04, 14:20
А если вытягиваю строку поиска на панель, то там управление перехвачено расширением "Context Search X".
I have installed "Context Search X", and it coexists with "Search Engine Editor" very well when the Manager window is opened via the Search Bar dropdown list:
Menu.png
Window.png
but not when it is opened via "Context Search X" submenu or its "Options" - because in these cases "Context Search X" opens its own window, that only mimics the browser's Search Engine Manager window.

Perhaps, it will be possible to inject the "Search Engine Editor" into this window too.
You do not have the required permissions to view the files attached to this post.

User avatar
_yup_
Moonbather
Moonbather
Posts: 59
Joined: 2025-04-26, 11:45

Re: Search Engine Editor

Post by _yup_ » 2025-07-05, 18:17

Version 1.3
What’s new

[+] Visual selection of the desired button, if there is more than one button in the search form for which the plugin is being created.
[+] Possibility to create plugins from scratch.
[+] Support for "Context Search X" extension.

2 Drugwash

I carefully reproduced the Search Engine Creator logic of placing it's menu item. I hope that my extension's button will be at the same place. But if not, I can do nothing more - the exact placement is out of my control.

What should be noted:

The official Mozilla documentation makes impression that default character encoding for Search Bar plugins is UTF-8.

But as I have discovered, this is not true! The default encoding is Windows-1252. Let save a plugin leaving the "Charset" field empty, and open it again.

User avatar
Drugwash
Lunatic
Lunatic
Posts: 316
Joined: 2016-01-28, 12:08
Location: Ploieşti, Romania

Re: Search Engine Editor

Post by Drugwash » 2025-07-05, 18:48

_yup_ wrote:
2025-07-05, 18:17
I hope that my extension's button will be at the same place.
It's in second section just like the other extension. Exact place is most likely dictated by the extension loading sequence which is probably directly related to the extensions' installation sequence in time. It really doesn't matter, it will never be the same for everybody. It's there, and that's what matters. Thank you very much for your patience and understanding! :thumbup:

User avatar
jars_
Lunatic
Lunatic
Posts: 427
Joined: 2016-12-27, 00:12

Re: Search Engine Editor

Post by jars_ » 2025-07-07, 14:10

for Custombuttons & Firefestures and those who do not need a search line on interface, btn code:

Code: Select all

// ontop if you wish
//const param = "chrome, dependent, modal, titlebar, top=200, left=430, width=600, height=800";

const param = "chrome, titlebar, top=200, left=430, width=600, height=800";
 window.openDialog("chrome://browser/content/search/engineManager.xul", "SEManager", param, window);