From 115cbb7bbcc3d134c1ee662286c525d90d2eb43d Mon Sep 17 00:00:00 2001 From: k Date: Wed, 1 Sep 2021 20:02:08 +0300 Subject: Change links protocol to HTTP Since this may be within a local network/VPN, where a number of services are behind IP addresses and may not have certificates, it makes more sense to make the default protocol for links HTTP. Modern browsers and HSTS will force HTTPS where available anyway. OR we can remove the prefix before {{url}} and type them individually for each URL. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index e5089cd..bed4f55 100755 --- a/index.html +++ b/index.html @@ -86,7 +86,7 @@
- {{name}} + {{name}} {{url}}
-- cgit v1.2.3 From 7b1b2985ad0342fdff7cccce08c8787a93310fa0 Mon Sep 17 00:00:00 2001 From: k Date: Wed, 1 Sep 2021 20:05:39 +0300 Subject: 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); -- cgit v1.2.3 From 41c22ed218d6f97f176ec3ef52c89ed2d17ad965 Mon Sep 17 00:00:00 2001 From: k Date: Wed, 1 Sep 2021 20:06:09 +0300 Subject: Update search.js --- assets/js/search.js | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/js/search.js b/assets/js/search.js index fc47a9d..3217735 100755 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -96,7 +96,6 @@ function search(text) { case "g": window.location = "https://www.google.com/?q=" + subtext; break; - } } else { var option = text.substr(1); -- cgit v1.2.3 From 190954b55012a5a933a8c0a8d869d34406db385d Mon Sep 17 00:00:00 2001 From: k Date: Fri, 3 Sep 2021 15:48:02 +0300 Subject: $sengine was not actually used Had declared search engine in variable, but the variable wasn't actually used. --- assets/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/search.js b/assets/js/search.js index 3217735..12736b2 100755 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -120,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; } } -- cgit v1.2.3