Add web-vanilla
This commit is contained in:
13
web-vanilla/shared.js
Normal file
13
web-vanilla/shared.js
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
function create_prologue() {
|
||||
let back_to_index = document.createElement("a");
|
||||
back_to_index.setAttribute("href", "../index.html");
|
||||
back_to_index.innerHTML = "Back to index";
|
||||
|
||||
let title = document.createElement("h1");
|
||||
title.innerText = document.title;
|
||||
|
||||
let body = document.getElementsByTagName("body")[0];
|
||||
body.insertBefore(title, body.firstChild);
|
||||
body.insertBefore(back_to_index, body.firstChild);
|
||||
}
|
||||
Reference in New Issue
Block a user