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
215 stars 26 forks source link

New button, search site internally #170

Open Mike-Reddick opened 4 years ago

Mike-Reddick commented 4 years ago

I'm thinking in an new button, like the "copy button" but to search the site internally, this button can work ever when the site have an search field, the extension just take the selected text and search using the "current site search field", I think about it because many times I copy using the extension to after put on site search field, for sites which I can visit one time. Maybe this need some new permission :) , thank you

CanisLupus commented 4 years ago

Well, first of all I welcome the idea. But it's... complicated.

This wouldn't need a new permission since SSS can already modify all pages to add its popup. :) But SSS would need to know how to search in the specific site you are in.

Although there are things in common between search fields of different sites, it is impossible for SSS to work on all of them. There are a lot of names/classes/IDs the search field can have, there can be multiple submission forms (or search fields) in a page, the search could be a custom text field that is submitted via JavaScript and which is not in a form, etc.

Furthermore, I predict a lot of user requests for specific sites when something doesn't work, and I definitely don't have the time needed to support this feature. :|

I would also argue that if the site is being used one time only, hence not being worth it to add a custom engine, then the user can copy and paste in the site's search field manually.

Concluding: I don't think this is worth the trouble, but I'll accept counter-arguments. ;)

Mike-Reddick commented 4 years ago

I understand all your arguments and your side, as you said for an site used one time is not ideal make an custom search. About of search field standard, I understand the issue, I have an extension ( https://addons.mozilla.org/en-US/firefox/addon/fox-input/ ) , this extension just focus in the first field, with my experience with this extension, I can say which this can find the search field for at least 90% of all sites, maybe the fields isn't an standard but in 90% is the first field, in rare cases the first is the login. Is possible ignore login fields? Login fields have standard? And if the extension try not search specific classes but the just first field? And I quite understand your side about users asking to adapt the button to specific sites, is an problem, but if you keep this new button disabled by default and when an advanced user enable it you show an warning so:

It wouldn't work ever because haven't an standard for search field, I HAVE a lot of user requests for specific sites when something doesn't work, and I DEFINITELY don't have the time needed to support this requests. I hope you can understand don't forget this is an FREE extension! Have a good day! Use at your own risk!

kkkkk ahahahah ahahah. It is just my last counter argument, but I understand you, do what you think be better, thank you!

CanisLupus commented 4 years ago

Hahah I appreciate the counter arguments ;)

Well, login fields have no standard either and suffer from the same problems, but since password managers usually depend on them I assume they are easier to separate from the rest of the page. Password fields are easy to skip, username ones probably not. I would need to do some research!

Assuming the first field to be the search will of course cause problems in many websites, and the meaning of "first" actually changes between what you see and where in the page layout the item is (oh, and some pages read right-to-left too, for example for the arabic language, but that can be taken into account), but I believe that under some assumptions the 90% success rate is believable. ;)

Finally, I guess adopting the last option wouldn't be too bad, even if not ideal (it's impossible to be perfect for this feature anyway).

I'll leave this suggestion open and look at this again in the future to see what can be done. ;)

Cheers!

Mike-Reddick commented 4 years ago

I agree with your replies, thanks so much!