-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
123 lines (123 loc) · 2.85 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
<!DOCTYPE html>
<html ng-app="extension_manager" ng-csp>
<head>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff
}
.ng-hide {
display: none !important;
}
html {
border: 0;
}
body {
background: #fff;
width: 530px;
height: 700px;
margin: 0 auto;
padding-left: 30px !important;
}
.table {
width: 500px !important;
}
h4 {
margin-top: 0;
display: inline-block;
margin-bottom: 0;
}
table {
background-color: transparent;
}
th {
text-align: left
}
.table {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
}
.table>thead>tr>th,
.table>tbody>tr>td {
padding: 8px;
line-height: 1.42857143;
}
.table>tbody>tr>td {
border-top: 1px solid #ddd;
}
.table {
border-collapse: collapse !important;
}
.form-control {
display: block;
width: 460px;
height: 34px;
padding: 0px 20px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
border-radius: 4px;
}
.button {
text-align: center;
border: 1px solid;
padding: .175rem .75rem;
border-radius: 5px;
color: #fff;
}
.green {
background-color: #198754;
border-color: #198754;
}
.red {
background-color: #dc3545;
border-color: #dc3545;
}
span {
display: inline-block;
vertical-align: middle;
}
</style>
</head>
<script src="angular.min.js"></script>
<script src="popup.js"></script>
<body ng-controller="chrome_extension_manager">
<br>
<div>
<input id="extension_list" placeholder="搜索..." class="form-control" type="text" ng-model="extension_list.$">
<table ng-show="filtered.length" class="table">
<thead>
<tr>
<th>名称</th>
<th>开关</th>
<th>卸载</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="extension in filtered = (extensions | filter:extension_list)">
<td>
<span
style="content: url("{{extension.icons[extension.icons.length-1].url}}");width:23px;padding:0px 10px;"></span><span>{{extension.name}}</span>
</td>
<td>
<a ng-click="switch(extension)">
<h4 ng-show="extension.enabled" class="button green">已开启</h4>
<h4 ng-show="!extension.enabled" class="button red">已关闭</h4>
</a>
</td>
<td>
<a ng-click="uninstall(extension)">
<h4><img style="width:23px;" src="trash.png"></h4>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>