Websites where the Add Custom Search fails
If you come across any sites / forms that don't work with the Add Custom Search function, list them here. I have some workarounds in mind, but I need more examples.
news.google.com - main search form
Other examples: cnil.fr jesuismort.com
Note: The "Find" button in advanced mode (search on MycroftProject) doesn't work (version 1.6.3).
Note: The "Find" button in advanced mode (search on MycroftProject) doesn't work (version 1.6.3).
Thanks. 1.6.3.1 going up. Dunno how some of this stuff gets by me and the linter
Ok, new code works for those websites. Should work with all non-standard search forms using GET
Works fine :) But tooltip "PerformASearchTooltip" doesn't appear!
But tooltip "PerformASearchTooltip" doesn't appear!
This is driving me nuts. I can't find the problem.
nevermind, got it
http://context.reverso.net/translation/
http://context.reverso.net/translation/
Fix ready
https://www.similarweb.com/
Same fix seems to work for that one too. I'll get a new release in the next couple days
After upgrading to version 1.7.0, it stopped working:
http://chomikuj.pl/action/SearchFiles

But it works in version 1.6.9.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
This, for example, does not work either:
https://www.gry-online.pl/szukaj.asp

And there are more such search engines.
Can confirm that with ContextSearch 1.7.0 on Firefox 61.0.1.
While all OpenSearch engine work fine, f.i. when searching from the address bar, some of the ContextSearch ones aren't. Here's a screenshot of one of them.
I have Firefox version 61.0.2 (64bit). The 1.6.9 version of the plugin works well on this Firefox. Version 1.7.0 does not support some search engines. For now I am using version 1.6.9.
hotfix going up 1.7.0.1
https://who-called.co.uk/
https://who-called.co.uk/
That site adds ok for me. It uses the alternative 'do a search' method, but it added. What happens when you try?
That's odd - it worked this time. When I tried earlier it threw up an error, very roughly "ContextSearch was unable to create a search entry for that website".
Not wanting to hijack this thread but is there any way to simulate a search done from the search box, rather than simply insert the search term into the URL? Phone numbers are usually shown formatted with spaces, so that method doesn't work.
Oh and thanks for getting back to me!
is there any way to simulate a search done from the search box, rather than simply insert the search term into the URL? Phone numbers are usually shown formatted with spaces, so that method doesn't work.
I'm not sure I know what you mean.
For that particular website, I see it will remove spaces and hyphens, effective defeating my fallback code which checks the url for the search terms. So if you entered 1-234-567-8910 the search results url would be https://who-called.co.uk/Number/12345678910 and my code wouldn't be able to pick out the search terms. I can't account for that kind of processing, be it client-side via javascript or server-side.
Basically I want to be able to highlight and ContextSearch phone numbers which include hyphens and spaces. The {searchTerms} method gives a 404 but, as you say, the site's own search function automatically strips them. Can that be replicated somehow, maybe using POST?
Ah, I see. I just tried a highlight search for 1-234-567-8910 and got the 404 error. I'd have to write some site-specific code or add an option for each engine to modify the search terms with a regex rule. Doable, but a bit time-consuming for a rare issue.
You might want to enable 'Manage With Bookmarks' and add a bookmarklet to the ContextSearch Menu folder with the following code as the URL. It won't be 100% what you want, but you'll be able to access it via ContextSearch
javascript:q = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (q!=null) location="https://who-called.co.uk/Number/" + escape(q).replace(/[^0-9]/g, ""); void 0
or
javascript:q = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (q!=null) window.open("https://who-called.co.uk/Number/" + escape(q).replace(/[^0-9]/g, ""), "_blank"); void 0
for opening in a new tab (popup blocker risk)
Great idea to use bookmarklets. Edited the replace term to replace(/%25\d\d|[^\d]/g, "") to remove character codes, and it works perfectly - thanks so much for your help!
@GlasWolf I've added a regex option to modify search terms for each engine. Look for it in the next release.
Even easier! I'll check it out when it appears, thanks again.
New regex option is live in 1.8.1. I tested the search engine for https://who-called.co.uk/ using the search regex "%25\\d\\d|[^\\d]", "" and it seems to work. I didn't actually get a proper result due to my ip being blocked (VPN) but the url looked good
searched for 1-234-567-8910
resulting url https://who-called.co.uk/Number/12345678910
This professional medicines search engine uses the POST method. Would it be possible to add it to your complement? Thank you https://cima.aemps.es/cima/publico/buscadoravanzado.html
@ebluser
I looked at https://cima.aemps.es/cima/publico/buscadoravanzado.html and I don't think it can work with ContextSearch. It seems to use javascript to fetch .json using a REST API.
You could, for example, use a template like this:
https://cima.aemps.es/cima/rest/medicamentos?multiple2={searchTerms}&cargaprincipiosactivos=true&nomostrarip=1&comerc=1
... and search for ABFENTIQ to receive this result: https://cima.aemps.es/cima/rest/medicamentos?multiple2=ABFENTIQ&cargaprincipiosactivos=true&nomostrarip=1&comerc=1
... but that .json may not be helpful to you.
@ebluser
I looked at https://cima.aemps.es/cima/publico/buscadoravanzado.html and I don't think it can work with ContextSearch. It seems to use javascript to fetch .json using a REST API.
You could, for example, use a template like this:
https://cima.aemps.es/cima/rest/medicamentos?multiple2={searchTerms}&cargaprincipiosactivos=true&nomostrarip=1&comerc=1... and search for
ABFENTIQto receive this result: https://cima.aemps.es/cima/rest/medicamentos?multiple2=ABFENTIQ&cargaprincipiosactivos=true&nomostrarip=1&comerc=1... but that .json may not be helpful to you. Indeed, it is not. However, ContestSearch has been able to include other search engines with post method. If you could define technical specifications or prerequisites for ContestSearch, it might be useful if the search engine developers could include improvements. Thanks!
@ebluser
Indeed, it is not. However, ContestSearch has been able to include other search engines with post method. If you could define technical specifications or prerequisites for ContestSearch, it might be useful if the search engine developers could include improvements. Thanks!
I'm not seeing where that engine uses POST. I'm looking at the network logs and only see GET requests to the REST API. Do you have a POST request I could look at?
I'm not seeing where that engine uses POST. I'm looking at the network logs and only see GET requests to the REST API. Do you have a POST request I could look at?
Sorry, I misinterpreted the behaviour of this search engine. Thanks again for the analysis and for the firefox add-on.
If you come across any sites / forms that don't work with the Add Custom Search function, list them here.
yandex.translate: