ssborbis / ContextSearch-web-ext

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

[Request] Option to enable popup menu on "page itself" #522

Closed ThomasSeeker closed 2 years ago

ThomasSeeker commented 2 years ago

In the Quick-Menu-Settings there is the option to enable searching via popup menu on "input / link / image / audio / video".

With the new wonderful capability of CS to start applications I regularly come across the use-case, where I would like to open the popup menu on neither of the above, but on the page-background itself, so the page-url gets used in the application. Examples are: Open this page in another browser; Open the video on this page in a player, ...

(The workaround for me in these cases ATM is to use the toolbar button.)

So I would really wish for a 6. option to enable the popup menu on "page itself". Wouldn't this make sense in your eyes too?

ssborbis commented 2 years ago

You could open the qm using a custom shortcut under CS Options -> Shortcuts. I believe you already know newer versions can handle the {url} parameter in the app launcher command line, so really, you can open a menu however you want, and regardless of the current search terms, only pass the current tab's url.

So I would really wish for a 6. option to enable the popup menu on "page itself". Wouldn't this make sense in your eyes too?

The question is, how would you trigger the menu to open, other than the keyboard shortcut? Most opening options rely on there either being text selected, or an element under the current mouse position that could be used as a search term ( link, image, etc ). There may be unwanted menu popups if the opening methods could be triggered at any time. I think it would be possible to do, but not for all options, and not without some unwanted menus. How would you open the qm on a "page" if you could? I'm guessing you're using a right-click?

ThomasSeeker commented 2 years ago

I believe you already know newer versions can handle the {url} parameter in the app launcher command line [...] and regardless of the current search terms, only pass the current tab's url.

Yes, this part works just fine in my app-launchers. My request is ONLY about the way to trigger the QM.

And yes, a keyboard shortcut would be a way. But currently I am using the right-click-hold for triggering it ... which I find very convenient.

Most opening options rely on there either being text selected, or an element under the current mouse position that could be used as a search term ( link, image, etc ). There may be unwanted menu popups if the opening methods could be triggered at any time.

Ah, now I understand! For some opening-methods other than mouse-clicks this might lead to unwanted openings, yes.

But with mouse-clicks this couldn't happen, could it?

I would want to use the QM just like the native Firefox context menu, which also gets triggered always, regardless of the element under the mouse. Just always after the right-click. ... Actually I am thinking of completely replacing the native context menu with the QM. ... Because all the native entries like "Reload Page", "Screenshot", "Copy Link", etc. ... are all easily replaced with QM.

ThomasSeeker commented 2 years ago

Thinking about it ... With the app-launcher-capability ContextSearch has developed into a real competitor for the native Firefox Context Menu. ... ContextSearch is basically an alternative context menu now. ... And a much better one too! :-) ... The native one is so rigid. Horrible. (Especially since the old add-ons to modify it stopped working a long time ago.)

ssborbis commented 2 years ago

I though I had added an option to open the qm anytime, regardless of selection. I'll look through the options and see if it's there. If not, I'll add something.

The native one is so rigid. Horrible. (Especially since the old add-ons to modify it stopped working a long time ago.)

That's definitely part o the problem. The other is, the webextension API is sandboxed pretty severely, there's only so much you can do with a modern addon.

ssborbis commented 2 years ago

Early testing looks good. Only works with mouse click / hold methods

Set manual option quickMenuOnMouseOpenWithoutSelection: true

I'll post here when I have a signed beta to test. Might be a few days. Peek 2022-07-30 21-26

ThomasSeeker commented 2 years ago

Wonderful, Ssborbis! ... I'm looking forward to it! Thank you so much! :-)

rediffusion commented 2 years ago

@ThomasSeeker

(The workaround for me in these cases ATM is to use the toolbar button.)

ATM - what's this❓

ThomasSeeker commented 2 years ago

ATM - what's this?

ATM ... is short for "at the moment". ;-)

ssborbis commented 2 years ago

This should be working in the beta here https://github.com/ssborbis/ContextSearch-web-ext/releases/download/v1.42rc1/contextsearch_web_ext-1.42rc1.xpi

ssborbis commented 2 years ago

The menu is opening without selection, but the frame / page url is not being sent to the search terms. I have that fixed locally. I'll get another beta out to test before releasing.

ThomasSeeker commented 2 years ago

Yes, the menu is opening wonderfully without selection now here too! ... And yes, looking foreward for the url being passed too! :-)

ssborbis commented 2 years ago

looking foreward for the url being passed too! :-)

This should now be working in v1.42. Let me know if everything is copacetic.

ThomasSeeker commented 2 years ago

Thank you ssborbis, this works very well now!

In some rare cases (maybe 1 out of 20) it does not send the url, but I could not figure out, how to replicate it. Maybe it hast to do with my system and firefox being horribly out of date due to my slow progress in building my new PC. I test again, when the PC is finished. ... For now this works very good!

Thank you very much once more for this wonderful helper. :-)

ssborbis commented 2 years ago

In some rare cases (maybe 1 out of 20) it does not send the url, but I could not figure out, how to replicate it.

If you see a pattern, let me know and I'll check it out.

ThomasSeeker commented 2 years ago

Ok, I will! ... Thanks again!