Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS Toolbar as a major Browser Search Engine #700

Open
Sagitee opened this issue May 19, 2024 · 11 comments
Open

CS Toolbar as a major Browser Search Engine #700

Sagitee opened this issue May 19, 2024 · 11 comments

Comments

@Sagitee
Copy link

Sagitee commented May 19, 2024

Hi and thanks for the great addon.
Would it be possible for the CS Toolbar menu address (.../searchbar.html)
to function as a search engine address eg.
.../searchbar.html/[externally searched terms]
so as to be able:

  1. to be set as the default search engine of the browser or of any external app that opens the browser when it makes a webSearch?
  2. to transfer those search terms to its search field (and optionally proceed to an autosearch eg. using its first search engine)?

Thank you.

@ssborbis
Copy link
Owner

I'll have to look into how a browser handles default engines. What browser are you using BTW so I can check?

@ssborbis
Copy link
Owner

Assuming you're using a chrome variant, I made a push to the master branch.

image

chrome://<this extension id>/searchbar.html?q=%s where <this extension id> is the string shown in the URL bar when you open CS Options

@ssborbis
Copy link
Owner

The new code uses the first non-folder node as the search engine. This code will need some modification before release, but it's a good place to start testing.

@Sagitee
Copy link
Author

Sagitee commented May 26, 2024

Hi ssborbis and thanks a lot for looking into this.
I mainly use kiwi, a chromium mobile browser and also FF on windows.
I installed the new push on FF and Iron desktop and on kiwi android,
but

chrome-extension://<this extension id>/searchbar.html?q=myterms
or
moz-extension://<this extension id>/searchbar.html?q=myterms

opens the CS ToolBar menu, just like when opening on previous versions

chrome-extension://<this extension id>/searchbar.html

without making a search with the first non-folder search engine (and without transferring “myterms” in the CS ToolBar menu search field for additional manual searches).
Shouldn’t that work before we test setting it as any browser’s search engine?
In any way, the same happens on FF or on Iron browser where I set it as a (default) search engine.

Thank you.

@ssborbis
Copy link
Owner

What is the first thing in your search engines list?

I've tested on chromium and firefox using the this url directly chrome-extension://<this extension id>/searchbar.html?q=myterms does the following:

  1. opens a new blank tab to searchbar.html
  2. quickly redirects to https://duckduckgo.com/?q=myterms&ia=web since I have DDG as the first engine in my list

FYI, visiting chrome-extension:///searchbar.html without a search query will only bring up a poorly formatted CS toolbar menu

@Sagitee
Copy link
Author

Sagitee commented May 27, 2024

  1. opens a new blank tab to searchbar.html
  2. quickly redirects to https://duckduckgo.com/?q=myterms&ia=web since I have DDG as the first engine in my listDDG as the first engine in my list

I tested it again without success (no "redirection" step 2) on Iron browser with the CS push default settings and after setting DDG as the first engine in the list and moving the CS QM tools to the bottom under the search engines.

I noted some errors in the extensions screen so I'm attaching some print screens.

Thank you.

a01
a02

a03

@ssborbis
Copy link
Owner

ssborbis commented May 31, 2024

Hmm... are you sure you're on the latest code in the master branch? I'll double-check my last push went through.

Going to
image

should stop loading the page before the menu displays if there's a query string in the URL

@Sagitee
Copy link
Author

Sagitee commented Jun 1, 2024

are you sure you're on the latest code in the master branch?

I had used this link

https://github.com/ssborbis/ContextSearch-web-ext/archive/refs/heads/development.zip

that you had once provided me. In the extensions CS card (above printscreen) showed

ContextSearch-web-ext 1.47.0

I now understand that by master branch you meant the zip of this link

https://github.com/ssborbis/ContextSearch-web-ext/archive/refs/heads/master.zip

which I used and now the extensions CS card reads

ContextSearch-web-ext 1.46.26

So

chrome-extension://<this extension id>/searchbar.html?q=myterms

finally works.

The opening of the searchbar.html is not visible but, as you mentioned, it now redirects (after about three seconds) to the first engine in CS SE list, searching for myterms.

Could that redirection be optional, so as the searchbar.html to just open (with myterms transferred in its search field) and to let the user make a normal CS search by clicking on any desired SE tile?

Thank you.

@ssborbis
Copy link
Owner

ssborbis commented Jun 1, 2024

It will take some work to get the searchbar.html page to look nice. I'll let you know when anything is worth testing.

@Sagitee
Copy link
Author

Sagitee commented Nov 24, 2024

a poorly formatted CS toolbar menu

It will take some work to get the searchbar.html page to look nice

Hi @ssborbis,

I can’t see why you find it poorly formatted / not nice.
Isn’t it similar to the toolbar, sidebar and quick menus, but just placed at the top left corner of the page?
Especially in the case of mobile browsers, where the page sizes are smaller, with a proper zooming to fit the width of the page, the toolbar menu looks and works very nicely.
I attach some printscreens of my menus:

FF Searchbar.html menu
01

FF Sidebar, Toolbar, and Quick menus
02

Kiwi (mobile) Searchbar.html/Toolbar menu (initial view)
03

Kiwi (mobile) Searchbar.html/Toolbar menu (200% scaled/zoomed view)
04

@ssborbis
Copy link
Owner

ssborbis commented Dec 3, 2024

I'll look into this more in a few weeks when my semester is over. I think it's just a matter of CSS, but will take some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants