ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
352 stars 37 forks source link

double submenu to combine in main context menu for quick access #187

Open leex-leex opened 5 years ago

leex-leex commented 5 years ago

Hi I downloaded and installed the add-on.

Access to search items in the context menu are in a double submenu. This makes access a bit difficult.

I would like to configure the program so that the list of search engines would be in the main context menu for quick access. I can not find the settings for. Are there any ideas? FF67 2019-06-02_0-34-31

ssborbis commented 5 years ago

Unfortunately, that isn't possible with the new cross-browser WebExtensions API (FF 57+). Each add-on is allowed at most a single entry in the main context menu.

(edit) The search method requiring the fewest steps would probably be the quick menu with the Simple Click opener without a mod key.

leex-leex commented 5 years ago

It's a pity Maybe you can recommend an add-on or another way to work with the context menu so that can open and freeze the ContextSearch window?

ssborbis commented 5 years ago

What do you mean 'freeze'? What are you trying to do?

leex-leex commented 5 years ago

I mean open the ContextSearch item (submenu) in the context menu and make it constantly open. To make an imitation as if to the item in the context menu has already brought the mouse cursor. And freeze it. I hope I clearly expressed my thought?

ssborbis commented 5 years ago

I could use a little more explanation. If I understand you correctly, you're wanting to force the context menu to remain open after expanding the submenu. For what purpose? To click and search multiple engines? Is it closing on you before you can execute a search? I'm still not sure what you're trying to accomplish.

Add-on developers have very little control over the context menu. Any time you click an item other than a submenu folder item or a menu item with a checkbox, the menu will automatically close.

leex-leex commented 5 years ago

I use this extension for the first time. I found the Quick Menu. Can it open with one click simultaneously with the Сontext Мenu?

ssborbis commented 5 years ago

I found the Quick Menu. Can it open with one click simultaneously with the Сontext Мenu?

Unless there's a bug, the quick menu and context menu are programmed to never open at the same time using right-click.

Do you want to access another context menu item / add-on simultaneously when you select text to perform a search with this add-on?

leex-leex commented 5 years ago

the quick menu and context menu are programmed to never open at the same time using right-click.

This is not good, as often need the context menu FF. And to reconfigure brain and fingers for a long or short press, or double-click and hold the RMB to show the ContextMenu appears, I think it is unnecessary. It's overkill.

Do you want to access another context menu item / add-on simultaneously when you select text to perform a search with this add-on?

Yes. How to do it?

ssborbis commented 5 years ago

It's not currently possible but I can make a change to the code to allow it.

ssborbis commented 5 years ago

Using right-click ...

context

I'll push the changes to the repo if you want to sideload for testing. You'll need to run userOptions.quickMenuAllowContextMenu = true; saveOptions(); from the console in CS options to set the hidden variable.

leex-leex commented 5 years ago

Thanks, it will be great. I used to use Quick Context Search. https://legacycollector.org/firefox-addons/502176/index.html

2019-06-05_7-46-21

I really liked it because it integrated the search engine buttons into the context menu on one line. But now it does not work in new versions of FF and the author abandoned support.

All hope for your Context Search and css, may be

leex-leex commented 5 years ago

Thank you very much for your work, but still, this is not what I wanted.

Here is the code that allows the "quick menu" to duplicate and integrate into the context menu, which is much more convenient.

ContextSearch.txt

It looks like this to me (at the top left is your quick menu) which I can hide . , ,

2019-06-11_0-16-09 , , ,

Using addon "Custom Buttons", the code is placed into Initialization. If you can embed this code in your application and use it "in its pure form" it will be great :)

ssborbis commented 5 years ago

Do you have a link to the addon "Custom Buttons"? I have no idea how that works with newer FF releases.

leex-leex commented 5 years ago

In order for the "Custom Buttons" to work on FF67, you need to change some files.

config-prefs.js.txt del ".txt" and put to C:\Program Files (x86)\Mozilla Firefox\defaults\pref

config.js.txt del ".txt" and put to C:\Program Files (x86)\Mozilla Firefox

custombuttons@xsms.org.xpi.zip del ".zip" and instail Custom Buttons

ssborbis commented 5 years ago

Ok, so you're enabling legacy extensions using config-prefs.js and using Custom Buttons to modify the context menu with the ContextSearch.txt script.

If you can embed this code in your application and use it "in its pure form" it will be great :)

If I understand you correctly, you're asking me to integrate all of what Custom Buttons does into this add-on, effectively replacing Custom Buttons altogether? This addon is built using the new FF57+ webextensions API and is cross-browser compatible with Chrome. Turning it into a legacy Firefox add-on is not really feasible.

I haven't tried your script with Custom Buttons yet, Is it 100% working? If so, that's very cool and I don't think there's much else I could do to further integrate into CS. If not and you need a few changes to my code to get it working, I'd be happy to work with you on it.

leex-leex commented 5 years ago

Unfortunately I do not have time to do this. I just show one of the ways ..

hg42 commented 5 years ago

I once also used a kind of context search extension that integrated into the context menu like this. In fact it's why I initially searched for a solution as web extensions and found CS.

Now, with all the possibilities of CS (sidebar, toolbar button, context submenu and quick menu) I don't see a real need for such an integration anymore. Especially when using a lot of engines and folders. Personally I use long click for the quickmenu and short click for the normal context menu (or vice versa if you want quicker access to the quick menu). If you want it very fast you can also drag and drop to an always open sidebar.