-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpopup.html
175 lines (174 loc) · 3.83 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="jquery.min.js"></script>
<script src="popup.js"></script>
<style>
/* common */
body{
margin: 0;
padding: 8px 12px;
box-sizing: border-box;
}
button {
border: 1px solid #333;
background: transparent;
padding: 0 10px;
min-width: 60px;
height: 24px;
line-height: 20px;
text-align: center;
outline: none;
cursor: pointer;
transition: all 300ms;
color: #333;
}
button.off{
color: #7f7f7f;
border-color: #7f7f7f;
cursor: not-allowed;
}
button:hover{
border-color: #fff;
color: #fff;
background-color: #333;
}
button.off:hover{
border-color: #7f7f7f;
color: #7f7f7f;
background-color: #7f7f7f;
}
.title{
margin: 0 0 10px;
}
hr{
margin: 12px 0;
}
/* url */
.form{
display: flex;
align-items: center;
}
#url {
width: 180px;
height: 22px;
line-height: 22px;
margin-right: 10px;
font-size: 14px;
padding: 0 0 0 4px;
outline: none;
border: 1px solid #333;
}
#list{
padding: 0 18px;
font-size: 14px;
margin: 0;
}
#list li {
margin-top: 12px;
font-size: 14px;
line-height: 24px;
position: relative;
cursor: pointer;
transition: all 500ms;
}
#list li:hover{
text-decoration: underline;
}
#list li:hover .close {
display: block;
}
#list li .close {
display: none;
position: absolute;
right: 0;
top: 50%;
width: 15px;
height: 15px;
transform: translateY(-50%);
cursor: pointer;
}
#list li .close:before,
#list li .close:after {
content: "";
height: 2px;
width: 100%;
position: absolute;
left: 0;
top: 7px;
background-color: #333;
}
#list li .close:before {
transform: rotate(45deg);
}
#list li .close:after {
transform: rotate(-45deg);
}
/* setting */
.date-container .checkbox{
display: inline-block;
margin-bottom: 8px;
}
.time-container {
margin-bottom: 8px;
}
.time-container .split {
display: inline-block;
margin: 0 10px;
}
.handle-container{
margin: 12px 0 0;
display: flex;
justify-content: flex-end;
}
/* force */
.force-container{
padding-top: 4px;
display: flex;
justify-content: space-between;
align-items: center;
}
/* mock */
.mock{
display: none;
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 100%;
background-color: rgba(255, 255, 255, .5);
cursor: not-allowed;
}
</style>
</head>
<body>
<body>
<div class="force-container">
<p id="forceTip">禁止修改生效时间和删减屏蔽网址</p>
<button id="force">开启</button>
</div>
<hr>
<div class="setting-container">
<p class="title">生效时间</p>
<div class="date-container"></div>
<div class="time-container">
<input type="time" id="startTime" value="09:00">
<span class="split">—</span>
<input type="time" id="endTime" value="18:00">
</div>
<div class="handle-container"><button id="save">保存</button></div>
</div>
<hr>
<div class="form-container">
<p class="title">输入需要屏蔽的网址(比如知乎:zhihu)</p>
<div class="form"><input type="text" id="url"><button id="add">添加</button></div>
<ul id="list"></ul>
</div>
<div class="mock"></div>
</body>
</body>
</html>