Skip to content

Commit 368b28e

Browse files
Setup
1 parent 8a83221 commit 368b28e

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

extras/game/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>Clicker Game</title>
6+
<meta charset="utf-8" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<link rel="stylesheet" href=".\style.css" />
9+
<script src=".\script.js" async></script>
10+
</head>
11+
12+
<body id="body">
13+
<h1>Clicker</h1>
14+
</body>
15+
16+
</html>

extras/game/script.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// finally got it to work :\
2+
3+
const run = async () => {
4+
5+
let { game: storage } = await chrome.storage.sync.get("game");
6+
var starterStorage = {"version":1, "clicks":0}
7+
8+
// check if storage is trust worthy
9+
if (storage) {
10+
console.log(storage)
11+
}else{
12+
await chrome.storage.sync.set({"game":JSON.stringify(starterStorage)});
13+
}
14+
}
15+
16+
run();

extras/game/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/*Working on soon*/

0 commit comments

Comments
 (0)