Variable for default search engine

Added a variable for default search engine (leaving Google for compatibility reasons), and added a case for Google if something else is defined.
This commit is contained in:
k 2021-09-01 20:05:39 +03:00 committed by GitHub
parent 115cbb7bbc
commit 7b1b2985ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,10 @@ 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);