-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
71 lines (67 loc) · 2.2 KB
/
Copy pathpopup.html
File metadata and controls
71 lines (67 loc) · 2.2 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Device Configurator</title>
<link rel="stylesheet" href="popup.css" />
</head>
<body>
<header>
<h1>Device Configurator</h1>
<p>Pick a device preset and apply it to the active tab.</p>
</header>
<main class="layout">
<section class="panel">
<h2>Device List</h2>
<div id="device-list" class="device-list"></div>
</section>
<section class="panel details">
<h2>Details</h2>
<form id="device-form">
<label>
Name
<input id="device-name" type="text" readonly />
</label>
<div class="row">
<label>
Width (px)
<input id="device-width" type="number" min="1" step="1" required />
</label>
<label>
Height (px)
<input id="device-height" type="number" min="1" step="1" required />
</label>
</div>
<div class="row">
<label>
Scale
<input id="device-scale" type="number" min="1" max="5" step="0.1" required />
</label>
<label>
Mobile
<select id="device-mobile">
<option value="true">true</option>
<option value="false">false</option>
</select>
</label>
</div>
<label>
User Agent (optional)
<input id="device-ua" type="text" placeholder="Leave empty to keep current" />
</label>
<div class="actions">
<button id="apply" type="submit">Apply to Active Tab</button>
<button id="reset" type="button" class="secondary">Reset Emulation</button>
</div>
</form>
<p class="note">
This applies emulation via the Chrome Debugger API. Chrome does not currently allow extensions to
add native device presets inside DevTools.
</p>
</section>
</main>
<div id="status" class="status"></div>
<script type="module" src="popup.js"></script>
</body>
</html>