-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopup.html
More file actions
151 lines (144 loc) · 3.21 KB
/
popup.html
File metadata and controls
151 lines (144 loc) · 3.21 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html>
<head>
<title>Jank Simulator</title>
<style>
body {
width: 350px;
padding: 10px;
font-family: Arial, sans-serif;
}
.control-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
}
button {
padding: 8px 12px;
margin-right: 10px;
cursor: pointer;
}
.value-display {
display: inline-block;
width: 50px;
text-align: right;
}
#status-indicator {
padding: 10px;
border-radius: 4px;
margin-bottom: 15px;
font-weight: bold;
text-align: center;
}
.status-inactive {
background-color: #f0f0f0;
color: #666;
}
.status-active {
background-color: #ffeb3b;
color: #333;
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.7;
}
100% {
opacity: 1;
}
}
.section-header {
margin-top: 20px;
padding-top: 10px;
border-top: 1px solid #ddd;
font-weight: bold;
display: flex;
justify-content: space-between;
align-items: center;
}
.bar-chart {
margin-top: 10px;
}
.bar-container {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.bar-label {
width: 80px;
}
.bar {
background-color: #4285f4;
height: 15px;
min-width: 1px;
border-radius: 2px;
}
.bar-value {
margin-left: 5px;
font-size: 12px;
}
#refresh-btn {
font-size: 12px;
padding: 4px 8px;
}
.status-message {
color: #666;
font-style: italic;
font-size: 12px;
}
</style>
</head>
<body>
<h2>Jank Simulator</h2>
<div id="status-indicator" class="status-inactive">INACTIVE</div>
<div class="control-group">
<label for="jank-time"
>Jank Time (ms):
<span id="time-value" class="value-display">500</span></label
>
<input
type="range"
id="jank-time"
min="50"
max="2000"
value="500"
step="50"
/>
</div>
<div class="control-group">
<label for="jank-interval"
>Interval (ms):
<span id="interval-value" class="value-display">1000</span></label
>
<input
type="range"
id="jank-interval"
min="50"
max="2000"
value="1000"
step="50"
/>
</div>
<div class="actions">
<button id="start-jank">Start Jank</button>
<button id="stop-jank">Stop Jank</button>
</div>
<div class="section-header">
<span>Long Tasks</span>
<button id="refresh-btn">Refresh</button>
</div>
<div id="long-tasks-container">
<p id="longtask-status" class="status-message">
Click refresh to get long task data
</p>
<div id="long-task-count"></div>
<div id="long-task-distribution" class="bar-chart"></div>
</div>
<script src="popup.js"></script>
</body>
</html>