-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.html
256 lines (251 loc) · 5.8 KB
/
options.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>网页内容修改器 - 设置</title>
<style>
body {
padding: 20px;
font-family: Arial, sans-serif;
max-width: 1200px;
margin: 0 auto;
background: #f5f5f5;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
background: white;
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header h1 {
margin: 0;
color: #333;
}
.header-actions {
display: flex;
gap: 10px;
}
.rules-container {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.rules-table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
.rules-table th,
.rules-table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #eee;
}
.rules-table th {
background: #f8f8f8;
font-weight: bold;
color: #666;
}
.rules-table tr:hover {
background: #f8f8f8;
}
.checkbox-cell {
width: 40px;
text-align: center;
}
.actions-cell {
width: 150px;
text-align: right;
}
button {
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.2s;
}
.primary-button {
background: #4CAF50;
color: white;
}
.primary-button:hover {
background: #45a049;
}
.secondary-button {
background: #666;
color: white;
}
.secondary-button:hover {
background: #555;
}
.delete-button {
background: #f44336;
color: white;
}
.delete-button:hover {
background: #da190b;
}
.search-box {
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
width: 200px;
margin-right: 10px;
}
.filter-section {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.filter-select {
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
}
.status-badge {
display: inline-block;
padding: 4px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: bold;
}
.status-active {
background: #e8f5e9;
color: #2e7d32;
}
.status-inactive {
background: #ffebee;
color: #c62828;
}
.bulk-actions {
margin-top: 20px;
padding: 15px;
background: #f8f8f8;
border-radius: 4px;
display: none;
}
.bulk-actions.show {
display: flex;
justify-content: space-between;
align-items: center;
}
.help-text {
font-size: 12px;
color: #666;
margin-top: 5px;
}
#importInput {
display: none;
}
/* Switch 开关样式 */
.switch {
position: relative;
display: inline-block;
width: 40px;
height: 20px;
margin: 0 8px;
vertical-align: middle;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.switch-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 20px;
}
.switch-slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 2px;
bottom: 2px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked + .switch-slider {
background-color: #4CAF50;
}
input:checked + .switch-slider:before {
transform: translateX(20px);
}
.status-cell {
white-space: nowrap;
}
.status-text {
display: inline-block;
vertical-align: middle;
font-size: 12px;
color: #666;
}
</style>
</head>
<body>
<div class="header">
<h1>规则管理</h1>
<div class="header-actions">
<button id="exportAllButton" class="secondary-button">导出全部</button>
<button id="exportSelectedButton" class="secondary-button" disabled>导出选中</button>
</div>
</div>
<div class="rules-container">
<div class="filter-section">
<input type="text" class="search-box" id="searchInput" placeholder="搜索规则...">
<select class="filter-select" id="modeFilter">
<option value="">所有修改模式</option>
<option value="once">单次修改</option>
<option value="loop">循环修改</option>
</select>
<select class="filter-select" id="statusFilter">
<option value="">所有状态</option>
<option value="active">启用</option>
<option value="inactive">禁用</option>
</select>
</div>
<div class="bulk-actions" id="bulkActions">
<span><span id="selectedCount">0</span> 个规则已选中</span>
<div>
<button class="secondary-button" id="enableSelected">启用选中</button>
<button class="secondary-button" id="disableSelected">禁用选中</button>
<button class="delete-button" id="deleteSelected">删除选中</button>
</div>
</div>
<table class="rules-table">
<thead>
<tr>
<th class="checkbox-cell">
<input type="checkbox" id="selectAll">
</th>
<th>规则名称</th>
<th>URL</th>
<th>选择器</th>
<th>修改模式</th>
<th>状态</th>
<th class="actions-cell">操作</th>
</tr>
</thead>
<tbody id="rulesTableBody">
<!-- 规则列表将通过 JavaScript 动态生成 -->
</tbody>
</table>
</div>
<script src="crypto-js.min.js"></script>
<script src="options.js"></script>
</body>
</html>