]> git.ardis.lu - zip-page/commitdiff
Truncate and wrap output
authorArdis Lu <ardisglu@gmail.com>
Thu, 28 Sep 2023 04:34:49 +0000 (21:34 -0700)
committerArdis Lu <ardisglu@gmail.com>
Thu, 28 Sep 2023 04:34:49 +0000 (21:34 -0700)
index.html

index 935e2ea2d6b51b635982ffe7fed97add5dd358be..9c6855b91d1464878161be31603d10c3ac4015ae 100644 (file)
       cursor: pointer;
     }
 
+    output {
+      word-break: break-all;
+    }
+
     footer {
       margin-block-start: auto;
       margin-block-end: 16px;
       const b64 = await textToGzipBase64(content);
 
       const url = `${location.origin}/#${b64}`;
-      e.target.elements['url'].innerHTML = `<a href="${url}">${url}</a>`;
+      e.target.elements['url'].innerHTML = `<a href="${url}">${url.substring(0, 60)}${url.length > 60 ? '...' : ''}</a>`;
     });
   </script>
 </body>
This page took 0.044346 seconds and 4 git commands to generate.