From ee39897e6005a0db93b44064490617591f1c4b68 Mon Sep 17 00:00:00 2001 From: "Caracal.js" <59297610+caracal-js@users.noreply.github.com> Date: Thu, 24 Feb 2022 14:43:19 -0500 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e2579a..01b7c7a 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# ultraviolet-frontend \ No newline at end of file +# Ultraviolet Frontend From 501f95a6faf0d7e361a7476dcd28637e3d2c2769 Mon Sep 17 00:00:00 2001 From: "Caracal.js" <59297610+caracal-js@users.noreply.github.com> Date: Thu, 24 Feb 2022 14:47:18 -0500 Subject: [PATCH 2/2] Update index.js --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index a249afb..17d6446 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ const input = document.querySelector('input'); form.addEventListener('submit', async event => { event.preventDefault(); window.navigator.serviceWorker.register(__uv$config.sw, { - scope: '/' + scope: __uv$config.prefix }).then(() => { let url = input.value.trim(); if (!isUrl(url)) url = 'https://www.google.com/search?q=' + url; @@ -18,4 +18,4 @@ form.addEventListener('submit', async event => { function isUrl(val = ''){ if (/^http(s?):\/\//.test(val) || val.includes('.') && val.substr(0, 1) !== ' ') return true; return false; -}; \ No newline at end of file +};