-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpopup.html
127 lines (110 loc) · 2.71 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fetch Form Data</title>
<style>
/* Loader styling */
#loader {
display: none;
width: 40px;
height: 40px;
border: 4px solid lightgray;
border-top: 4px solid blue;
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin: 10px auto;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* Basic styling */
body {
font-family: Arial, sans-serif;
padding: 10px;
width: 300px;
}
.button-container {
display: flex;
gap: 8px;
}
button {
padding: 8px;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s;
}
#fetchData {
background-color: #4CAF50;
flex: 2;
}
#fetchData:hover {
background-color: #45a049;
}
#clearData {
background-color: #f44336;
flex: 1;
display: none;
}
#clearData:hover {
background-color: #da190b;
}
#status {
margin-top: 10px;
font-size: 14px;
color: #333;
max-height: 400px;
overflow-y: auto;
}
.response-header {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.response-header h3 {
margin: 0;
display: flex;
align-items: center;
gap: 8px;
}
.cache-badge {
font-size: 12px;
color: #666;
background-color: #f0f0f0;
padding: 2px 6px;
border-radius: 3px;
font-weight: normal;
}
ul {
padding-left: 20px;
list-style-type: none;
}
li {
margin-bottom: 8px;
}
strong {
display: block;
font-weight: bold;
}
.fade-in {
animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
</style>
</head>
<body>
<div class="button-container">
<button id="fetchData">Fetch Form Data</button>
<button id="clearData">Clear</button>
</div>
<div id="loader"></div>
<div id="status" class="fade-in"></div>
<script src="popup.js"></script>
</body>
</html>