Add suggestion URL for custom search engine in chrome - google-chrome

I have a local search engine backed by a elasticsearch and a thin nodejs API for search. I want to be able to search those documents from Google Chrome (builds available from Google, not Chromium) directly. In this use case, I will use chrome ONLY with this search engine, so I don't want to use OmniBox keyword search API. I want the same behavior as I get while choosing the default search engine in chrome. Which is
Start typing in the OmniBox and it shows a list of suggestions.
Hit enter and it takes to the search results page
I got the #2 working by adding a new search engine under settings and providing the search api's url. I can't get #1 working.
The two urls exposed by my server are:
http://localhost:3000/complete?query=my (this returns a list of search suggestions which I want to show while typing in OmniBox).
http://localhost:3000/results?query=my+sample+query (this returns the actual search results as a web page, this is working)
Things that I have tried:
Added search engine using window.externals.AddSearchProvider with OpenSearchDescription.xml link. The XML has suggestions url as well.
Tried writing a background extension with OmniBox but it does not allow me to search without using a keyword
I searched through Chromium and found this JSON file
https://code.google.com/p/chromium/codesearch#chromium/src/components/search_engines/prepopulated_engines.json&q=prepopulated&sq=package:chromium&l=1
But I don't know how can I use it (or if its even possible to do this in official builds of Chrome).

I finally found the solution.
The opensearch.xml document reference can be used as a link in the head section of the HTML page. It contains two URL schemes, one for search results and other for suggestions.
The details can be found here:
Opensearch Document Specs.
As soon as I updated my index.html and opened the page in Chrome, Chrome automatically added a new search engine. It didn't show that there is a suggestions URL under Settings > Manage search engines.
Next, I chose my engine as the default search engine by clicking on Make Default and done! Now I can see all the search suggestions in the omnibox without using a keyword.

There is a Setting Overrides mechanism for Chrome Extensions, which is not widely known, which can achieve what you want, but:
At least according to the docs, it only works on Windows and Mac.
You won't be able to publish the extension unless you can verify the site in Webmaster Tools. Otherwise, you are stuck with unpacked installs.

Related

Copy content from webpage and paste it in another website to search in Edge or Chrome browser

Need help please.
How can I achieve the following?
I use https://spur.us/context website to investigate IP addresses.
Currently I am having to copy IP address from a website and paste manually in the spur.us website which is time consuming. I want to make this process quicker.
How can I just select an IP address like shows in below image and open in separate website by attaching the copied content like https://spur.us/context/20.238.65.64
Is there any tool/extensions I can use or setting within browser?
TIA
quick way is, you can customize browser search engine check this https://support.google.com/programmable-search/answer/4513882?hl=en#:~:text=From%20the%20Programmable%20Search%20Engine,can%20always%20add%20more%20later.
I don't think if there is an extension exists for this purpose.
Any experienced Extension developer, including me, can make one you. feel free to connect.
Is it that you need to navigate to https://spur.us/context/20.238.65.64 by only selecting 20.238.65.64 and performing some sort of action within a single page? It looks like the context menu wouldn't help (the browser would directly lead you to this ip address instead of searching for it), but you can achieve it by specifying your own search engine. Please go to the following url for search engine setting.
Edge: edge://settings/searchEngines?search=engine
Chrome: chrome://settings/searchEngines?search=search+engine
You can add spur.us as a search engine. You need to choose Make default after adding it and make sure your search engine url looks like this: https://spur.us/context/%s
Then, you need to
Copy the ip address.
Press Ctrl+E to call the default search engine.
Paste the ip address.
Now you will be able to see the expected result. Though it may not be exactly what you've asked for, I think it does smooth the work flow. Remember to make default your previous default search engine after the work is finished.

How to remove istartsurf from browser

How to remove istartsurf from chrome?
Context: I've installed a bunch of extensions after a day I got "istartsurf" as my main search engine in chrome which sends the search to their server and then redirects the search to google making it seem like you searched on google from the start. It takes a split second then you only see google.com in the address bar.
I've installed
chrome extensions: Requestly, Toby for Chrome
apps: Java, JDK, postgresql.
Can anyone relate to this? as I want to narrow done the source of this.
For Chrome you need to go to settings > Search engine
For Search engine used in the address bar set Google (or whatever you want)
For Manage search engines go through to the lists and remove anything suspicious.
Similar should be done for other browsers.
If this goes deeper (registry or something else) please let me know so I can update the answer.

Change browser search engine for every user/machine in windows domain

I want every workstation in my school to have Ecosia as their default search engine.
If one wants to change his search engine to Ecosia on his home computer with Firefox he needs to add the extension to his Firefox profile and change his default search engine to the then added option "Ecosia"
But it is hard to do this for every user in our Windows domain automatically.
My easiest option would be to deploy a script to modify the Firefox(Chrome/Edge) installation but didn't find a way to change the configured search engine. Adding the extension seems to be no problem.
Also I can not change anything in the user files as they are not saved locally but on the domain controller. (Otherwise I could just overwrite the users Firefox profiles)
Some of the other options to deploy custom Firefox installers in companies included preinstalled extensions but I haven't found a configuration that included the search engine configuration.
I want to change the search preferences in Firefox, Chrome and Edge. Firefox alone is driving me crazy.
But there must be a way to achieve this as many viruses doing search hijacking change your search engine without problems event though i was not able to find any source code of those.
So in the end the question is:
Is there a way to add an extension and change the search engine of Firefox/Chrome/Edge without touching the user data or is there a way to preconfigure installers to include a different standard search engine?
I'm kinda desperate by now, so any approach is welcome.
To be specific:
My school has about 200 computers with Windows7/Windows10
combined in a windows domain. Each Student has his own account.
The system for distributing software installers/scripts is opsi
If you use Firefox ESR, you can set up search engines via GPO.
You can add a search engine as part of your web extension via chrome_settings_overrides.search_engine in the extension's manifest (example); making it the default will prompt the user.
The way "viruses [are] doing search hijacking change" is probably by storing the search plugin file to searchplugins and updating the user preferences file.

#REDIRECT pages showing in MediaWiki search

I have several pages on a MediaWiki installation that use redirects. According to the MediaWiki Redirect documentation:
After making a redirect at a page, you can no longer get to that page by using its name or by any link using that name; and they do not show up in wiki search results, either.
However, all my redirects are showing in search results:
I've read the page above and tried searching for this issue, but not gotten anywhere. What could be causing this?
I'm using MediaWiki 1.23.5 with the Vector skin. The search engine used is the vanilla search included with MediaWiki.
The default search of MediaWiki includes the Redirect pages, unhappily this can't be configured. The solution is: Use another search engine :) Wikimedia wikis using Lucene and currently being changed to Elasticsearch (using the CirrusSearch Extension). There redirect pages aren't visible as default.
There are also some other full text search engines.

Chome API manifest dynamic url permission based on default search engine?

Is there a way to extract the url for the default search engine (for omnibox) and then include that within the URL permissions scope?
Quick answer is no, there is no such API to do that. Unless you want to use a NPAPI plugin, which can basically do anything. If so then you can access the default search engine by reading chrome files, according to this post, it's in a sqlite database.