-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
220 lines (192 loc) · 4.65 KB
/
popup.html
File metadata and controls
220 lines (192 loc) · 4.65 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body {
width: 280px;
padding: 20px;
font-family: 'Segoe UI', sans-serif;
background-color: #fff;
text-align: center;
}
h1 {
font-size: 18px;
margin-bottom: 5px;
color: #333;
}
p {
font-size: 12px;
color: #666;
margin-bottom: 20px;
}
.main-btn {
display: block;
width: 100%;
padding: 12px;
background-color: #228be6;
color: white;
border: none;
border-radius: 6px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: background 0.2s;
margin-bottom: 10px;
}
.main-btn:hover {
background-color: #1c7ed6;
}
.main-btn.picking {
background-color: #fa5252;
}
.secondary-btn {
background: none;
border: 1px solid #dee2e6;
color: #495057;
padding: 8px;
width: 100%;
border-radius: 6px;
cursor: pointer;
font-size: 13px;
}
.secondary-btn:hover {
background-color: #f8f9fa;
}
.status {
margin-top: 15px;
font-size: 12px;
color: #868e96;
}
.rule-list-header {
margin: 20px 0 10px;
font-size: 13px;
font-weight: 600;
text-align: left;
color: #495057;
border-bottom: 1px solid #eee;
padding-bottom: 5px;
}
.rule-list {
max-height: 200px;
overflow-y: auto;
text-align: left;
}
.rule-item {
display: flex;
justify-content: space-between;
align-items: center;
background: #f8f9fa;
border: 1px solid #eee;
padding: 8px;
border-radius: 4px;
margin-bottom: 8px;
font-size: 12px;
}
.rule-selector {
font-family: monospace;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 140px;
color: #333;
}
.rule-actions {
display: flex;
gap: 6px;
}
.icon-btn {
background: none;
border: none;
cursor: pointer;
font-size: 14px;
padding: 2px;
opacity: 0.6;
transition: opacity 0.2s;
}
.icon-btn:hover { opacity: 1; }
.btn-edit:hover { color: #228be6; }
.btn-toggle:hover { color: #40c057; }
.btn-delete:hover { color: #fa5252; }
.empty-state {
color: #adb5bd;
font-style: italic;
font-size: 12px;
padding: 10px;
text-align: center;
}
/* 每日一言样式 */
.quote-section {
margin-top: 20px;
padding: 15px;
background-color: #f8f9fa;
border-radius: 8px;
text-align: center;
border: 1px dashed #dee2e6;
font-size: 13px;
color: #495057;
position: relative; /* 为了定位刷新按钮 */
}
.quote-text {
font-family: "KaiTi", "STKaiti", serif; /* 楷体更有文艺感 */
margin-bottom: 8px;
line-height: 1.5;
font-weight: bold;
padding: 0 10px; /* 防止文字遮挡刷新按钮 */
}
.quote-author {
font-size: 12px;
color: #868e96;
text-align: right;
margin-bottom: 10px;
}
.quote-refresh-btn {
position: absolute;
top: 5px;
right: 5px;
background: none;
border: none;
cursor: pointer;
font-size: 14px;
opacity: 0.5;
transition: opacity 0.2s;
padding: 2px;
}
.quote-refresh-btn:hover {
opacity: 1;
}
.footer-link {
margin-top: 10px;
font-size: 12px;
color: #adb5bd;
text-decoration: none;
display: block;
text-align: center;
transition: color 0.2s;
}
.footer-link:hover {
color: #40c057;
text-decoration: underline;
}
</style>
</head>
<body>
<h1>网页整容助手</h1>
<p>0代码基础,点击即可修改样式</p>
<button id="togglePickBtn" class="main-btn">🖱️ 开始选取元素</button>
<button id="clearRulesBtn" class="secondary-btn">🗑️ 清除本页所有修改</button>
<div class="rule-list-header">已修改的元素</div>
<div id="ruleList" class="rule-list">
<div class="empty-state">暂无修改记录</div>
</div>
<!-- 每日一言区域 -->
<div class="quote-section" id="quoteSection">
<button class="quote-refresh-btn" id="refreshQuoteBtn" title="刷新">🔄</button>
<div class="quote-text" id="quoteText">正在获取每日一言...</div>
<div class="quote-author" id="quoteAuthor"></div>
<a href="#" id="jefskyLink" class="footer-link">www.jefsky.com</a>
</div>
<div class="status" id="statusMsg">准备就绪</div>
<script src="popup.js"></script>
</body>
</html>