From f6585452942662e4c6c48bdf06fdc81e8c713eab Mon Sep 17 00:00:00 2001
From: Feuerfuchs <git@feuerfuchs.dev>
Date: Mon, 1 Jul 2019 11:11:03 +0200
Subject: Register proxy as protocol handler

---
 js/main.ts | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'js')

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 @@
 
 //
 
+if ('registerProtocolHandler' in navigator) {
+    (navigator as any).registerProtocolHandler('web+gopher', 'https://gopher.feuerfuchs.dev/%s', 'Web Gopher Proxy');
+}
+
 function ensureSetting(key: string, defaultValue: string): string {
     let strValue = localStorage.getItem(key);
     if (strValue === null) {
-- 
cgit v1.2.3-70-g09d2