From 7b1b2985ad0342fdff7cccce08c8787a93310fa0 Mon Sep 17 00:00:00 2001 From: k Date: Wed, 1 Sep 2021 20:05:39 +0300 Subject: [PATCH] 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. --- assets/js/search.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/js/search.js b/assets/js/search.js index 7d3cc76..fc47a9d 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,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);