From 96fdfcfa4320aca025f1d7c850ae858852f85a20 Mon Sep 17 00:00:00 2001 From: Nicholas Jitkoff Date: Thu, 21 Jul 2022 02:39:52 -0700 Subject: [PATCH] Update edit --- docs/edit.css | 2 +- docs/edit.html | 2 +- docs/edit.js | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/edit.css b/docs/edit.css index b7af608..9607d51 100644 --- a/docs/edit.css +++ b/docs/edit.css @@ -225,7 +225,7 @@ input:focus { position: fixed; top: 0; left: 0; - width: 50vw; + width: 100vw; height: 100vh; background-position: center 60px; box-sizing: border-box; diff --git a/docs/edit.html b/docs/edit.html index c801fc1..926d162 100644 --- a/docs/edit.html +++ b/docs/edit.html @@ -66,7 +66,7 @@ twitter - upload file… +
about itty diff --git a/docs/edit.js b/docs/edit.js index 789954e..7da185d 100644 --- a/docs/edit.js +++ b/docs/edit.js @@ -346,11 +346,11 @@ function updateLink(url, metadata, push) { if(previewContent) QS("#preview-frame").src = bittyLink; var hash = location.hash; - // if (push || !hash || !hash.length) { - // window.history.pushState(content.innerHTML, null, url); - // } else { - // window.history.replaceState(content.innerHTML, null, url); - // } + if (push || !hash || !hash.length) { + window.history.pushState(null, null, bittyLink); + } else { + window.history.replaceState(null, null, bittyLink); + } var length = bittyLink.length; QS("#length").innerText = length + " bytes"; @@ -416,7 +416,7 @@ function copyThenLink() { return confirm("Copied your link to the clipboard. Paste it to share."); } function copyLink() { - var text = location.href; + var text = bittyLink; var dummy = document.createElement("input"); document.body.appendChild(dummy); dummy.value = text;