Skip to content

Commit

Permalink
Fixes for Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
corbindavenport committed Jun 24, 2021
1 parent a54ac4b commit f478ee4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ chrome.omnibox.onInputChanged.addListener(function (text, suggest) {
currentRequest = suggests(text, function (data) {
// Set the maximum number of suggestion slots, and leave one for the settings option
var results = []
// Chrome and Firefox support 4 suggestions
num = 4
if (isFirefox) {
// Firefox supports 4 suggestions
num = 4
} else if (isChrome) {
// Chrome can do 8 suggestions
num = 8
}
for (var i = 0; i < num; i++) {
results.push({
content: data[1][i],
Expand Down
2 changes: 1 addition & 1 deletion welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1>Welcome to Wikipedia Search <span class="version"></span>!</h1>
<div class="row">
<div class="col-md-8">
<h2>Getting Started</h2>
<p>To perform a search, just type 'wiki' in your browser's address bar, then press the Tab key, then type the name of the article. Live suggestions from Wikipedia are displayed as you type.</p>
<p>To perform a search, just type 'wiki' in your browser's address bar, then press the Tab key (Space bar for Firefox), then type the name of the article. Live suggestions from Wikipedia are displayed as you type.</p>
<p>You can also highlight any word or phrase on the web, and an option to search in Wikipedia will appear in the context menu. Results open in a new tab, so your current page is not lost.</p>
<p>Finally, it's possible to override the default language by typing a Wikipedia language prefix before your search. For example, to search for Google in the French Wikipedia, you would type "fr Google".</p>
</div>
Expand Down

0 comments on commit f478ee4

Please sign in to comment.