From becf4fa54687849a0f63e399ffe88233c3ed9a7c Mon Sep 17 00:00:00 2001 From: Sean Edmunds Date: Mon, 21 Nov 2022 12:01:29 -0600 Subject: [PATCH] Added new search provider --- src/assets/functions.js | 14 ++++++++++---- src/links.json | 8 ++++---- src/providers.json | 3 ++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/assets/functions.js b/src/assets/functions.js index f93a9cc7..5a338910 100644 --- a/src/assets/functions.js +++ b/src/assets/functions.js @@ -159,9 +159,12 @@ export function updateLabel(text) { case "t": document.getElementById("searchType").innerHTML = "Trakt search"; break; - case "y": + case "yt": document.getElementById("searchType").innerHTML = "YouTube search"; break; + case "y": + document.getElementById("searchType").innerHTML = "You search"; + break; case "w": document.getElementById("searchType").innerHTML = "Wikipedia search"; break; @@ -218,9 +221,12 @@ export function search(text) { case "tv": window.location = "https://www.thetvdb.com/search?query=" + subtext; break; - case "y": + case "yt": window.location = "https://www.youtube.com/results?search_query=" + subtext; break; + case "y": + window.location = "https://www.you.com/search?q=" + subtext; + break; case "w": window.location = "https://en.wikipedia.org/w/index.php?search=" + subtext; break; @@ -239,7 +245,7 @@ export function search(text) { case "d": window.location = "https://www.duckduckgo.com"; break; - case "y": + case "yt": window.location = "https://www.youtube.com"; break; case "r": @@ -281,4 +287,4 @@ export function replaceAll(search, replacement) { export default function main () { return; -} \ No newline at end of file +} diff --git a/src/links.json b/src/links.json index 6c197640..3acfc472 100644 --- a/src/links.json +++ b/src/links.json @@ -22,7 +22,7 @@ "links": [ { "name": "Nextcloud", - "url": "https://home.halfaperture.com/nextcloud" + "url": "https://home.halfaperture.com/nextcloud/apps/files" }, { "name": "OneDrive", @@ -98,15 +98,15 @@ "links": [ { "name": "Plex", - "url": "http://plex.tv" + "url": "https://app.plex.tv" }, { "name": "Twitch", - "url": "http://twitch.tv" + "url": "https://twitch.tv" }, { "name": "Netflix", - "url": "http://netflix.com" + "url": "https://netflix.com" }, { "name": "YouTube", diff --git a/src/providers.json b/src/providers.json index 06004833..bae04daf 100644 --- a/src/providers.json +++ b/src/providers.json @@ -11,7 +11,8 @@ {"name":"Spotify","url":"https://open.spotify.com/search/results/","prefix":"/s"}, {"name":"TheTVDB","url":"https://www.thetvdb.com/search?query=","prefix":"/tv"}, {"name":"Trakt","url":"https://trakt.tv/search?query=","prefix":"/t"}, - {"name":"YouTube","url":"https://www.youtube.com/results?search_query=","prefix":"/y"}, + {"name":"YouTube","url":"https://www.youtube.com/results?search_query=","prefix":"/yt"}, + {"name":"You","url":"https://www.you.com/search?q=","prefix":"/y"}, {"name":"Wikipedia","url":"https://en.wikipedia.org/w/index.php?search=","prefix":"/w"}, {"name":"Plex","url":"https://app.plex.tv/desktop/#!/search?query=","prefix":"/p"}, {"name":"Rotten Tomatoes","url":"https://www.rottentomatoes.com/search?search=","prefix":"/rt"}