aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2019-07-01 11:11:03 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2019-07-01 11:11:03 +0200
commitf6585452942662e4c6c48bdf06fdc81e8c713eab (patch)
treeb389df977a1ad46aba79b962b325440b06bbe938 /js
parentFix len check while checking the URI for response (diff)
downloadgopherproxy-f6585452942662e4c6c48bdf06fdc81e8c713eab.tar.gz
gopherproxy-f6585452942662e4c6c48bdf06fdc81e8c713eab.tar.bz2
gopherproxy-f6585452942662e4c6c48bdf06fdc81e8c713eab.zip
Register proxy as protocol handler
Diffstat (limited to 'js')
-rw-r--r--js/main.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/main.ts b/js/main.ts
index 32c5a5b..adf95c6 100644
--- a/js/main.ts
+++ b/js/main.ts
@@ -2,6 +2,10 @@
2 2
3// 3//
4 4
5if ('registerProtocolHandler' in navigator) {
6 (navigator as any).registerProtocolHandler('web+gopher', 'https://gopher.feuerfuchs.dev/%s', 'Web Gopher Proxy');
7}
8
5function ensureSetting(key: string, defaultValue: string): string { 9function ensureSetting(key: string, defaultValue: string): string {
6 let strValue = localStorage.getItem(key); 10 let strValue = localStorage.getItem(key);
7 if (strValue === null) { 11 if (strValue === null) {