starting on the extension

This commit is contained in:
Oliver Atkinson
2024-12-12 15:32:04 -07:00
parent 298ad39a79
commit 611a1e923b
10 changed files with 86 additions and 0 deletions

18
browser/popup/popup.html Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<button id="newtab">Open Historical Pages</button>
<p id="tim"></p>
<script src="popup.js"></script>
</body>
<style>
html {
background: black;
color: white;
}
</style>
</html>

3
browser/popup/popup.js Normal file
View File

@@ -0,0 +1,3 @@
document.getElementById("newtab").addEventListener('click', async function(e) {
await browser.tabs.create({ url: "/main/main.html" })
})

5
browser/popup/runner.js Normal file
View File

@@ -0,0 +1,5 @@
document.body.textContent = "";
let header = document.createElement("h1");
header.textContent = "This page has been eaten";
document.body.appendChild(header);