PrettyPaste: Add Fork and New button

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
Gunwant Jain
2022-01-16 13:21:15 +05:30
parent 372bbf28d3
commit 449f0c38a9
7 changed files with 80 additions and 7 deletions

15
static/js/pretty.js Normal file
View File

@@ -0,0 +1,15 @@
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;
}