Files
paste/static/js/pretty.js
Gunwant Jain 449f0c38a9 PrettyPaste: Add Fork and New button
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-16 14:24:10 +05:30

15 lines
321 B
JavaScript

const homePage = document.location.origin;
function forkClicked () {
const paste = document.getElementById('pasteContent');
let text = paste.innerText;
localStorage["forkText"] = text;
console.log(text);
window.location = homePage;
}
function newPasteClicked () {
window.location = homePage;
}