CanisLupus / swift-selection-search

Swift Selection Search (SSS) is a simple Firefox add-on that lets you quickly search for some text in a page using your favorite search engines.
https://addons.mozilla.org/firefox/addon/swift-selection-search/
MIT License
213 stars 27 forks source link

{searchterms} doesn't work for everything #241

Open Bhaalspawn opened 2 years ago

Bhaalspawn commented 2 years ago

when i search for more than 1 word like "brad pitt" and website doesn't use brad+pitt in the address but the space remain blak "brad pitt" or it's "brad-pitt"....the research fails

CanisLupus commented 2 years ago

Hi! Every website is different. Some will auto-convert spaces to their preferred format, others won't. If the website requires + between words and it doesn't convert them, you can use something like {searchTerms{ |+} to replace spaces with the plus sign.

Please take a look at the "Advanced usage" of the instructions to learn more about these replacements:

image

Hopefully this helps! Let me know :)

Bhaalspawn commented 2 years ago

Well it was very hard for me to understand all those codes but at the end i managed to did what i needed, replacing + with - and also adding (lowercase). So at the moment it's all good...

Sorry if i ask but i use another extension that has similar purpose but instead of {searchterms} i have to put %s...do you think it's possible to do the same thing? It's an extensions that allows me to create new search plugins

CanisLupus commented 2 years ago

Well it was very hard for me to understand all those codes but at the end i managed to did what i needed, replacing + with - and also adding (lowercase).

Nice! :)

Sorry if i ask but i use another extension that has similar purpose but instead of {searchterms} i have to put %s...do you think it's possible to do the same thing?

Names between curly brackets are just the way SSS does things, since it's unlikely to be part of an actual URL and allows it to support more stuff between the braces, like replacements. But I agree it's not pretty 😅 %s wouldn't be very flexible.

What are you trying to achieve with {searchterms} that works with %s on the other extension? Does it deal with spaces in some automated way? Something else?

Bhaalspawn commented 2 years ago

wait i found out that also the other extension support {searchTerms} but only the in this form......it doesn't accept the other features. i need the same thing i did for SSS so just the { |-} and a (lowercase)

CanisLupus commented 2 years ago

Alright! Don't know about the other extension but let me know if you have any other questions about SSS. :) Otherwise we can probably close this issue. Cheers!

Bhaalspawn commented 2 years ago

a solution would be if i can export engines created with SSS to the firefox search box ...the opposite that is possible to do now.

Gitoffthelawn commented 2 years ago

Hi! Every website is different. Some will auto-convert spaces to their preferred format, others won't. If the website requires + between words and it doesn't convert them, you can use something like {searchTerms{ |+} to replace spaces with the plus sign.

Hi all! Just FYI, I think @CanisLupus likely meant {searchTerms{ |+}} above. :)

CanisLupus commented 2 years ago

a solution would be if i can export engines created with SSS to the firefox search box ...the opposite that is possible to do now.

Sorry I didn't get that. A solution to what problem? I actually don't know if that is possible (it may be!) but SSS is not being actively developed (at least not for new features).

Hi all! Just FYI, I think @CanisLupus likely meant {searchTerms{ |+}} above. :)

Hi @Gitoffthelawn! :) Ooops, yes, you are completely right, it was missing the closing curly bracket. I guess it helps to show how ugly the syntax is 😅

Bhaalspawn commented 2 years ago

Sorry I didn't get that. A solution to what problem? I actually don't know if that is possible (it may be!) but SSS is not being actively developed (at least not for new features).

solutiion for what i need. if i could import engines created with SSS, i wouldn't need the other extension that adds new engines to firefox search box

CanisLupus commented 2 years ago

I see! Can you tell me the name of that extension you use? I suppose that if it can add engines to Firefox then so can any other extension, so I'm curious. I never researched that. :)

Bhaalspawn commented 2 years ago

add custom search engine

https://addons.mozilla.org/it/firefox/addon/add-custom-search-engine/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search

CanisLupus commented 2 years ago

Thank you! 🙏

Bhaalspawn commented 2 years ago

for what?? i thank you if you can understand how to import there the search engines or if you can do a similar extension that can use all the features of SSS

CanisLupus commented 2 years ago

For showing me what extension this was :) Sadly there's no way to do that in SSS, but it's good to know that it may be possible to add engines to Firefox from an extension in some way.