-
-
Notifications
You must be signed in to change notification settings - Fork 60
add ability to search by string in address bar #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks @apicellaj, very much appreciated! I have a slightly different idea of how to implement this. As described in #165, it would be nice if there was a drop down menu entry for searching, so that the user explicitly selects the search. This is to avoid accidentally sending a request containing sensitive data to the search engine. This has happened to me quite often: I paste some sensitive text (such as password) into the url bar and instinctively press enter, imagining that I have pasted a link. An alternate to the menu entry would be to open an |
Thanks for clarifying, @hrj. One more question: would an implementation of both methods be okay? For example, clicking the drop down menu initiates a search for the string but hitting enter defaults to an about:confirmSearch page. |
Would be perfect 👍 |
Conflicts: src/Primary_Extension/org/lobobrowser/primary/ext/ComponentSource.java
I've been having quite a few problems getting the JComboBox to work smoothly with the drop down search menu so I have only implemented the about:confirmSearch page so far. Does this implementation of the search page match what you had in mind? |
@apicellaj Sorry for the late response. It works great, thanks! I am looking forward for more contributions from you; would you mind signing the CLA here? If you have any doubts or questions about it, please raise an issue there or hit me up on the gitter chat room. |
No problem and thanks for the feedback. The CLA is signed and I'm looking forward to contributing more as well. |
this.navigate(searchEngine.getURL(addressText.substring(1))); | ||
} else { | ||
this.navigate(searchEngine.getURL(addressText)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am not mistaken, the above changes are not required anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change prevents the Search Button on the browser from dropping the first character in the string; since the other way to call the search function is by starting the query with a question mark.
add ability to search by string in address bar. closes #165
This fix is for #165 that allows strings typed into the address bar to be searchable by default search engine.
There is also a small fix to prevent the browser search button from always searching for urlText.substring(1).