diff options
| author | Jeroen <jeroenpardon@users.noreply.github.com> | 2021-12-05 02:19:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-05 02:19:01 +0100 |
| commit | 462f5142f1826f43cf7fe2f89aaa6821661c3fd0 (patch) | |
| tree | dd0a733ad466354ca56afd6e638a2df98a09c2dc /assets | |
| parent | 2db1e87300be6bc5f906f09140ffb56eb0d7a305 (diff) | |
| parent | 190954b55012a5a933a8c0a8d869d34406db385d (diff) | |
Merge pull request #23 from korikori/master
Make app links use HTTP by default and define default search engine in variable
Diffstat (limited to 'assets')
| -rwxr-xr-x | assets/js/search.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/assets/js/search.js b/assets/js/search.js index 7d3cc76..12736b2 100755 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -1,5 +1,6 @@ var sindex = 0; var cycle = false; +var sengine = "https://www.google.com/?q="; // Default search engine function start() { var query = getParameterByName('q'); @@ -92,6 +93,9 @@ function search(text) { case "y": window.location = "https://www.youtube.com/results?search_query=" + subtext; break; + case "g": + window.location = "https://www.google.com/?q=" + subtext; + break; } } else { var option = text.substr(1); @@ -116,7 +120,7 @@ function search(text) { else window.location = "https://" + text; } else { - window.location = "https://www.google.com/search?q=" + text; + window.location = sengine + text; } } |