Revert "Add back button to bookmarklet UI"

This reverts commit b0e6bea9ae.
This commit is contained in:
akp 2022-04-17 20:03:50 +01:00
parent e81e4ff147
commit 1286ff0d68
No known key found for this signature in database
GPG key ID: AA5726202C8879B7

View file

@ -8,14 +8,6 @@ javascript:(() => {
let metaImage = "";
let metaDescription = "";
function replacePageBody(newContent) {
const old = document.documentElement.outerHTML;
document.open("text/html");
document.write(newContent);
document.close();
return "<!DOCTYPE html>" + old; // yes this is an assumption
}
function getMetaValue(propName) {
const x = document.getElementsByTagName("meta");
for (let i = 0; i < x.length; i++) {
@ -95,11 +87,12 @@ javascript:(() => {
</table>
<input type="submit" id="submit" value="Submit">
<input type="button" id="goback" value="Go back">
</body>
</html>`
const previousPageBody = replacePageBody(page);
document.open("text/html");
document.write(page);
document.close();
const titleBox = document.getElementById("title");
const descriptionBox = document.getElementById("description");
@ -123,8 +116,4 @@ javascript:(() => {
window.location.href = url;
});
document.getElementById("goback").addEventListener("click", function () {
replacePageBody(previousPageBody);
})
})();