From 43ae392726429f34f1f99bc4185af060b8529ecf Mon Sep 17 00:00:00 2001 From: Nicholas Jitkoff Date: Sat, 28 May 2022 22:59:15 -0700 Subject: [PATCH] default missing type to data rendering --- docs/index.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/index.js b/docs/index.js index 7344f6b..a8d1a69 100644 --- a/docs/index.js +++ b/docs/index.js @@ -2,8 +2,7 @@ const HEAD_TAGS = () => btoa('\n'); const HEAD_TAGS_EXTENDED = () => btoa(` `); - window.dataLayer = window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-WHNPBD4T42'); - + // if ('serviceWorker' in navigator) { // navigator.serviceWorker @@ -126,6 +125,7 @@ renderMode = "data"; } else if (info.type == "text") { } else if (info.type == "image") { + } else if (info.type == undefined) { } else if (!renderer) { console.log("unknown type, rendering as download") renderMode = "download"; @@ -137,15 +137,14 @@ renderMode = "script"; } - if (info?.encoding == "base64" && !info.params?.encode) { - bitty.compressDataURL(fragment, function(compressedFragment) { - console.log("Compressing long url", fragment.length, compressedFragment.length) - window.location.hash = window.location.hash.replace(fragment, compressedFragment); - window.location.reload(); - console.log("Reloading") - }) - - } + // if (info?.encoding == "base64" && !info.params?.encode) { + // bitty.compressDataURL(fragment, function(compressedFragment) { + // console.log("Compressing long url", fragment.length, compressedFragment.length) + // window.location.hash = window.location.hash.replace(fragment, compressedFragment); + // window.location.reload(); + // console.log("Reloading") + // }) + // } } else { var colon = fragment.indexOf(":"); if ( colon > 0 && colon < 15) {