From 246649a3ac0111821c181f3025d8c9c29611f99a Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Mon, 2 Oct 2023 21:27:09 -0700 Subject: [PATCH] Use href instead of origin Enables offline usage on file: URL scheme --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 128b5af..c4344e1 100644 --- a/index.html +++ b/index.html @@ -145,7 +145,7 @@ const content = new FormData(e.target).get('content'); const b64 = await textToGzipBase64(content); - const url = `${location.origin}/#${b64}`; + const url = `${location.href}#${b64}`; e.target.elements['url'].innerHTML = `${url.substring(0, 60)}${url.length > 60 ? '...' : ''}`; }); -- 2.47.3