-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
37 lines (37 loc) · 1.27 KB
/
popup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My Plugin</title>
<link rel="stylesheet" href="style.css">
<script src="my_plugin.js"></script>
</head>
<body style="width: 800px; height: 500px;">
<h1>My Plugin</h1>
<div id="content"></div>
<canvas id="myCanvas"></canvas><br>
<button id="tabs">Active tabs!</button>
<button id="processes">Active processes!</button>
<button id="screenshot">Take screensot!</button>
<button id="anime">Anime button!</button>
<a id="dl" download="Canvas.png" href="#">Download Canvas</a>
<script type="module">
import init, { my_plugin_function, print_processes, take_screen, dont_press, download } from "./pkg/my_plugin.js";
init().then(() => {
document.getElementById("tabs").onclick = function() {
my_plugin_function();
};
document.getElementById("processes").onclick = function() {
print_processes();
};
document.getElementById("screenshot").onclick = function() {
take_screen();
};
document.getElementById("anime").onclick = function() {
dont_press();
};
document.getElementById("dl").addEventListener('click', download, false);
});
</script>
</body>
</html>