Skip to content

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

Merged
merged 5 commits into from
Jan 27, 2016

Conversation

apicellaj
Copy link
Contributor

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).

@hrj
Copy link
Member

hrj commented Jan 22, 2016

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 about:confirmSearch page, which has links to the various search engine queries, the default search engine being prominent. The user can then just click the link (or tab to the link and press Enter) to start the search.

@apicellaj
Copy link
Contributor Author

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.

@hrj
Copy link
Member

hrj commented Jan 23, 2016

would an implementation of both methods be okay?

Would be perfect 👍

Conflicts:
	src/Primary_Extension/org/lobobrowser/primary/ext/ComponentSource.java
@apicellaj
Copy link
Contributor Author

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?

@hrj
Copy link
Member

hrj commented Jan 27, 2016

@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.

@apicellaj
Copy link
Contributor Author

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));
}
Copy link
Member

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.

Copy link
Contributor Author

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.

hrj added a commit that referenced this pull request Jan 27, 2016
add ability to search by string in address bar. closes #165
@hrj hrj merged commit 74dd15e into gngrOrg:master Jan 27, 2016
@apicellaj apicellaj deleted the issue-165 branch January 28, 2016 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants