Revert "Add back button to bookmarklet UI"
This reverts commit b0e6bea9ae
.
This commit is contained in:
parent
e81e4ff147
commit
1286ff0d68
1 changed files with 3 additions and 14 deletions
|
@ -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);
|
||||
})
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue