Merge pull request #23 from korikori/master

Make app links use HTTP by default and define default search engine in variable
This commit is contained in:
Jeroen 2021-12-05 02:19:01 +01:00 committed by GitHub
commit 462f5142f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,6 @@
var sindex = 0; var sindex = 0;
var cycle = false; var cycle = false;
var sengine = "https://www.google.com/?q="; // Default search engine
function start() { function start() {
var query = getParameterByName('q'); var query = getParameterByName('q');
@ -92,6 +93,9 @@ function search(text) {
case "y": case "y":
window.location = "https://www.youtube.com/results?search_query=" + subtext; window.location = "https://www.youtube.com/results?search_query=" + subtext;
break; break;
case "g":
window.location = "https://www.google.com/?q=" + subtext;
break;
} }
} else { } else {
var option = text.substr(1); var option = text.substr(1);
@ -116,7 +120,7 @@ function search(text) {
else else
window.location = "https://" + text; window.location = "https://" + text;
} else { } else {
window.location = "https://www.google.com/search?q=" + text; window.location = sengine + text;
} }
} }

View file

@ -86,7 +86,7 @@
<span class="iconify icon" data-icon="mdi-{{icon}}"></span> <span class="iconify icon" data-icon="mdi-{{icon}}"></span>
</div> </div>
<div class="apps_text"> <div class="apps_text">
<a href="https://{{url}}" {{#if target}}target="{{target}}"{{/if}} >{{name}}</a> <a href="http://{{url}}" {{#if target}}target="{{target}}"{{/if}} >{{name}}</a>
<span id="app-address">{{url}}</span> <span id="app-address">{{url}}</span>
</div> </div>
</div> </div>