-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
120 lines (111 loc) · 3.11 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>开发助手</title>
<style>
body {
font-family: Arial, sans-serif;
/* color: #007bff; */
color: #5cb85c;
/* background-color: #5cb85c; */
/* border-color: #4cae4c; */
}
.title {
font-weight:bold;
font-size: medium;
}
.container {
width: 480px;
display: flex;
align-items: center;
margin-top: 5px;
}
.input-container {
margin-inline: 10px;
}
input[type="text"] {
padding: 5px;
border: 1px solid #ccc;
border-radius: 3px;
}
select {
padding: 5px;
margin-inline: 5px;
border: 1px solid #ccc;
border-radius: 3px;
}
button {
margin-top: 5px;
margin-bottom: 5px;
padding: 5px 10px;
background-color: #5cb85c;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
@keyframes fadeOut {
0% { opacity: 1; }
90% { opacity: 1; }
100% { opacity: 0; }
}
#tips {
display: none;
transform: translate(-50%, -50%);
background-color: lightgreen;
animation: fadeOut 1s forwards;
}
</style>
</head>
<body>
<label class="title">时间转换</label>
<div class="container">
<label for="timestampInput">当前时间:</label>
<div class="input-container">
<span id="current_ts"> </span> <span id="tips">复制完成</span>
</div>
</div>
<div class="container">
<div class="input-container">
<input type="text" id="timestampInput" class="ts" placeholder="请输入时间戳">
</div>
<select id="unitSelect">
<option value="seconds">秒</option>
<option value="milliseconds">毫秒</option>
</select>
<button id="convertToTimestap">转换</button>
<div class="input-container">
<input type="text" id="datetimeOutput" class="dt">
</div>
</div>
<div class="container">
<div class="input-container">
<input type="text" id="datetimeInput" placeholder="请输入时间" class="dt">
</div>
<select id="unitSelect2">
<option value="seconds">秒</option>
<option value="milliseconds">毫秒</option>
</select>
<button id="convertToDatetime">转换</button>
<div class="input-container">
<input type="text" id="timestampOutput" class="ts">
</div>
</div>
<label class="title">编码解码转义</label>
<div class="encrypt">
<textarea name="urlencode" id="tx_input" cols="60" rows="5" placeholder="输入"></textarea>
<button id="bt_urlencode">URLEncode</button>
<button id="bt_urldecode">URLDecode</button>
<button id="bt_jsonescope">JSON除转义</button>
<button id="bt_md5">MD5</button>
<button id="bt_base64encode">Base64 Encode</button>
<button id="bt_base64decode">Base64 Decode</button>
<br>
<textarea name="urloutput" id="tx_output" cols="60" rows="5" placeholder="输出"></textarea>
</div>
<script src="./lib/md5.js"> </script>
<script src="./popup.js"> </script>
</body>
</html>