-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
137 lines (120 loc) · 3.25 KB
/
popup.html
File metadata and controls
137 lines (120 loc) · 3.25 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
<!DOCTYPE html>
<html>
<head>
<title>JSON Formatter Settings</title>
<style>
body {
width: 300px;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
margin: 0;
background: #fff;
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.settings-section {
border-radius: 12px;
padding: 16px;
}
h3 {
font-size: 18px;
font-weight: 500;
margin: 0 0 16px 0;
color: #1d1d1f;
}
select {
width: 100%;
padding: 8px 12px;
border: 1px solid #d2d2d7;
border-radius: 8px;
font-size: 14px;
color: #1d1d1f;
background: white;
appearance: none;
cursor: pointer;
background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2212%22%20height%3D%227%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M1%201l5%205%205-5%22%20stroke%3D%22%23555%22%20stroke-width%3D%222%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fsvg%3E");
background-repeat: no-repeat;
background-position: right 12px center;
margin-bottom: 16px;
}
select:focus {
outline: none;
border-color: #0071e3;
box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}
.checkbox-wrapper {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 0;
border-bottom: 1px solid #d2d2d7;
}
.checkbox-wrapper:last-child {
border-bottom: none;
padding-bottom: 0;
}
.checkbox-wrapper label {
font-size: 14px;
color: #1d1d1f;
}
input[type="checkbox"] {
appearance: none;
width: 40px;
height: 24px;
background: #e4e4e4;
border-radius: 12px;
position: relative;
cursor: pointer;
transition: background 0.3s;
margin: 0;
}
input[type="checkbox"]:checked {
background: #34c759;
}
input[type="checkbox"]::before {
content: '';
position: absolute;
width: 20px;
height: 20px;
border-radius: 50%;
top: 2px;
left: 2px;
background: white;
transition: transform 0.3s;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
input[type="checkbox"]:checked::before {
transform: translateX(16px);
}
label[for="theme"] {
display: block;
font-size: 14px;
color: #1d1d1f;
margin-bottom: 8px;
}
</style>
</head>
<body>
<div class="settings-section">
<h3>General Settings</h3>
<label for="theme">Theme:</label>
<select id="theme">
<option value="dark">Dark</option>
<option value="light">Light</option>
</select>
<div class="checkbox-wrapper">
<label for="autoFormat">Auto-format all JSON content</label>
<input type="checkbox" id="autoFormat">
</div>
<div class="checkbox-wrapper">
<label for="formatAllSites">Run on all websites</label>
<input type="checkbox" id="formatAllSites">
</div>
<div class="checkbox-wrapper">
<label for="showButtons">Show control buttons</label>
<input type="checkbox" id="showButtons">
</div>
</div>
<script src="libs/browser-polyfill.js"></script>
<script src="popup.js"></script>
</body>
</html>