-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
94 lines (89 loc) · 2.14 KB
/
popup.html
File metadata and controls
94 lines (89 loc) · 2.14 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>URL窗口查看器</title>
<style>
body {
width: 300px;
padding: 10px;
font-family: Arial, sans-serif;
}
.section {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #333;
}
textarea {
width: 100%;
height: 80px;
padding: 5px;
margin-bottom: 10px;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
font-family: monospace;
resize: vertical;
}
select {
width: 100%;
padding: 5px;
margin-bottom: 10px;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
background-color: #f9f9f9;
}
button {
padding: 5px 10px;
background-color: #4285f4;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
margin-right: 5px;
}
button:hover {
background-color: #3367d6;
}
.current-url {
padding: 8px;
background-color: #f0f7ff;
border: 1px solid #cce5ff;
border-radius: 4px;
margin-top: 5px;
word-break: break-all;
font-size: 14px;
}
#viewIframe {
width: 100%;
height: 300px;
border: 1px solid #ddd;
margin-top: 10px;
display: block;
}
</style>
</head>
<body>
<h2>URL窗口查看器</h2>
<div class="section">
<label for="jsonInput">输入URL:</label>
<textarea id="addInput" placeholder='例如: 翻译__https://www.example.com, 豆包__https://www.doubao.com'></textarea>
<button id="addButton">导入URL</button>
<button id="getButton">导出URL</button>
</div>
<div class="section">
<label for="urlSelector">选择URL:</label>
<select id="urlSelector"></select>
<div id="currentUrl" class="current-url">当前未选择URL</div>
</div>
<button id="viewButton">查看</button>
<button id="removeButton">移除URL</button>
<iframe id="viewIframe" sandbox="allow-scripts allow-same-origin allow-forms"></iframe>
<script src="popup.js"></script>
</body>
</html>