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:
parent
115cbb7bbc
commit
7b1b2985ad
1 changed files with 5 additions and 0 deletions
|
@ -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,10 @@ 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);
|
||||||
|
|
Loading…
Reference in a new issue