aboutsummaryrefslogtreecommitdiff
path: root/src/background/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/index.js')
-rw-r--r--src/background/index.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/background/index.js b/src/background/index.js
index e8882c5..8544c0f 100644
--- a/src/background/index.js
+++ b/src/background/index.js
@@ -36,7 +36,11 @@ const doBackgroundAction = (sender, action) => {
}
const normalizeUrl = (string) => {
- return 'http://' + string;
+ try {
+ return new URL(string).href
+ } catch (e) {
+ return 'http://' + string;
+ }
}
const cmdEnterHandle = (request, sender) => {