ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
321 stars 36 forks source link

Template missing #585

Closed Bhaalspawn closed 1 year ago

Bhaalspawn commented 1 year ago

aka "Click OK and perform a new search using the form you are attempting to add ?"

i don't know what to do in this case. In Firefox i have an extensions that allows to add engines manually with some "corrections" i tried to copy the same link and add the same engine but it didn't work (Engines added but not working)

i talk about websites that in the search like doesn't have + (like Harry+Potter) but they have a space or - or %20 etc how do i correct those links to make them work? is there a tutorial to know how to do it? i see there are a lot of parameters that maybe can do what i'm asking (post params, modify terms search)

ssborbis commented 1 year ago

First off, what website are you trying to add?

i don't know what to do in this case. In Firefox i have an extensions that allows to add engines manually with some "corrections"

That message means the query URL isn't obvious to this addon, but if you do a simple search using the website's search bar, it will try to figure out the proper template / URL from the results page. If that fails, you'll need to use another method to add the engine. Normally, you'd get bounced back to the Add to ContextSearch modal, where you can get directed to mycroftproject.com or the Create form where you can manually set all the params yourself.

i talk about websites that in the search like doesn't have + (like Harry+Potter) but they have a space or - or %20 etc how do i correct those links to make them work?

Use the Modify Terms Regex field. There's an example right there in the form's placeholder showing how to replace spaces with underscores.

Bhaalspawn commented 1 year ago

i can't see any example, i see only some letters and symbols that should mean something but if i don't know what they are i can't understand. it's not that it's telling me "put this if you want this etc etc"

Just tell me how to turn a result like this https://www.google.it/search?q=Simple+Plan (with +) in https://www.google.it/search?q=Simple-Plan (with -)

when i just write "Simple plan" with space

ssborbis commented 1 year ago

It's regex https://regex101.com/

/\s+/-/g

/[match]/[replacement]/options

Bhaalspawn commented 1 year ago

thanks but how do i turn uppercase letters into lowercase?

ssborbis commented 1 year ago

but how do i turn uppercase letters into lowercase?

Until the next release, you have to chain regex like #579

After the next release, use %sl and %su in the template

ssborbis commented 1 year ago

v1.46 is live. From now on, you can replace {searchTerms} or %s in templates with %su or %sl for upper and lower case respectively