implement o/O command

This commit is contained in:
Shin'ya Ueoka 2017-08-15 22:00:05 +09:00
parent 9a808f45ed
commit 36680ed8fe
5 changed files with 39 additions and 18 deletions

View file

@ -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) => {