-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
57 lines (57 loc) · 1.85 KB
/
index.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<script src="./dist/typescript.js"></script>
<style>
#WebExtension * {
margin-bottom: 0.6em;
}
#WebExtension {
background: black;
color: white;
font-family: system-ui;
min-width: 100vw;
min-height: 100vh;
padding: 2em;
font-size: 1.5em;
}
#WebExtension a {
color: white;
}
</style>
</head>
<body>
<div id="WebExtension">
To debug WebExtension polyfill, run the code below.
<br />
<input readonly value="npx serve ." />
<br />
Then put your WebExtension at /extension/{extension_id}/
<br />
And add your extension id to /src/index.ts
<br />
Let's choose the environment.
<br />
I want this page to be a ...
<ul>
<li>
<a href="?type=b">background page</a>
</li>
<li>
<a href="?type=p&url=_options_">options page</a>
</li>
<li>
<a href="?type=p&url=_popup_">popup page</a>
</li>
<li>
<input id="url" type="url" placeholder="https://example.com" />
<button onclick="window.open(`/?type=m&url=${url.value}`)">emulated content script</button>
</li>
</ul>
</div>
<script src="./dist/out.js"></script>
</body>
</html>