mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
Update edit
This commit is contained in:
parent
f346bb579b
commit
96fdfcfa43
3 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
<a target="_blank" id="twitter" href="https://twitter.com/">twitter</a>
|
||||
<!-- <a target="_blank" id="bitly" href="https://bitly.com/">Bitly</a><br> -->
|
||||
|
||||
<a id="upload">upload file…</a>
|
||||
<a id="upload" style="display:none">upload file…</a>
|
||||
<hr>
|
||||
<!-- <a id="new" href="/edit">new site</a><br> -->
|
||||
<a id="about" target="_blank" href="http://about.bitty.site" id="about">about itty</a>
|
||||
|
|
|
|||
12
docs/edit.js
12
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue