-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopup.html
More file actions
134 lines (119 loc) · 6.57 KB
/
Copy pathpopup.html
File metadata and controls
134 lines (119 loc) · 6.57 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>我的视频哪去了</title>
<link rel="stylesheet" href="popup.css">
</head>
<body>
<div class="container">
<header>
<h1>
<img src="icons/icon48.png" class="title-icon" alt="插件图标">
我的视频哪去了
</h1>
<div class="cache-info">
<span>已缓存:<span id="cache-count">0</span> 条</span>
<span style="display: inline-flex; align-items: center; gap: 5px;">
<svg class="platform-icon" viewBox="0 0 24 24" fill="white">
<path d="M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.658.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.657-.373.906zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.786 1.894v7.52c.017.764.28 1.395.786 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373-.275 1.88-.773.506-.498.769-1.129.786-1.893v-7.52c-.017-.765-.28-1.396-.786-1.894-.507-.497-1.134-.755-1.88-.773zM8 11.107c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c0-.373.129-.689.386-.947.258-.257.574-.386.947-.386zm8 0c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373Z"/>
</svg>
<span id="bilibili-count">0</span>
</span>
<span style="display: inline-flex; align-items: center; gap: 5px;">
<svg class="platform-icon" viewBox="0 0 24 24" fill="white">
<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>
</svg>
<span id="youtube-count">0</span>
</span>
</div>
<div class="tabs">
<button class="tab active" data-tab="videos">视频列表</button>
<button class="tab" data-tab="settings">设置</button>
</div>
</header>
<!-- 视频列表页 -->
<div class="tab-content" id="videos" style="display: block;">
<div class="toolbar">
<div class="search-box">
<input type="text" id="search-input" placeholder="搜索视频标题...">
</div>
<div class="filter-buttons">
<button class="filter-btn active" data-filter="all">全部</button>
<button class="filter-btn" data-filter="bilibili">BiliBili</button>
<button class="filter-btn" data-filter="youtube">YouTube</button>
</div>
</div>
<div class="video-list" id="video-list">
<!-- 视频项将在JavaScript中动态生成 -->
<div class="empty-message">正在加载...</div>
</div>
</div>
<!-- 设置页 -->
<div class="tab-content" id="settings" style="display: none;">
<form id="settings-form" class="settings-form">
<!-- 添加首页限制模式说明 -->
<div class="info-section">
<h3>功能说明</h3>
<p class="info-text">本插件已设置为仅在B站和YouTube首页工作,不会缓存视频播放页的推荐视频。</p>
</div>
<div class="form-group">
<label for="max-cache-bilibili">BiliBili最大缓存数量:</label>
<input type="number" id="max-cache-bilibili" min="10" max="5000" step="10">
<span class="form-hint">设置最多缓存多少条BiliBili视频记录(自动保存)</span>
</div>
<div class="form-group">
<label for="max-cache-youtube">YouTube最大缓存数量:</label>
<input type="number" id="max-cache-youtube" min="10" max="5000" step="10">
<span class="form-hint">设置最多缓存多少条YouTube视频记录(自动保存)</span>
</div>
<div class="form-group">
<label>
<input type="checkbox" id="auto-clear">
自动清除过期视频
</label>
<span class="form-hint">启用后,将自动清除指定天数前的视频</span>
</div>
<div class="form-group">
<label for="clear-interval">清除间隔(天):</label>
<input type="number" id="clear-interval" min="1" max="30">
<span class="form-hint">设置多少天前的视频自动清除</span>
</div>
<!-- 添加快速保存模式选项 -->
<div class="form-group">
<label>
<input type="checkbox" id="fast-save-mode">
启用快速保存模式
</label>
<span class="form-hint">开启后,使用增强型保存逻辑,确保即使快速刷新也能保存视频信息,推荐开启(自动保存)</span>
</div>
<!-- 添加调试模式选项 -->
<div class="form-group">
<label>
<input type="checkbox" id="debug-mode">
启用调试模式
</label>
<span class="form-hint">开启后,将在控制台显示详细的调试信息,用于排查问题(自动保存)</span>
</div>
<div class="form-actions">
<button type="button" id="reset-settings">重置设置</button>
</div>
<div class="cache-actions">
<h3>缓存管理</h3>
<div class="cache-buttons">
<button type="button" id="clear-cache" class="danger-btn">清空所有缓存</button>
<button type="button" id="clear-bilibili" class="warning-btn">清空BiliBili缓存</button>
<button type="button" id="clear-youtube" class="warning-btn">清空YouTube缓存</button>
</div>
<span class="form-hint danger-hint">注意:清空操作不可恢复,请谨慎使用</span>
</div>
</form>
</div>
<footer>
<div>我的视频哪去了 v0.0.5</div>
</footer>
</div>
<script src="popup.js"></script>
</body>
</html>