Skip to content

一分钟搭建影视站,支持Docker等部署方式

add disclaimer modal and check on page load

developer4f7ad33b7e0b
diff --git a/index.html b/index.html
index 8526702..98ee79b 100644
--- a/index.html
+++ b/index.html
@@ -234,6 +234,29 @@
</div>
</footer>
+ <!-- 免责声明弹窗 -->
+ <div id="disclaimerModal" class="fixed inset-0 bg-black/95 hidden flex items-center justify-center z-[60] transition-opacity duration-300">
+ <div class="bg-[#111] p-8 rounded-lg w-11/12 max-w-2xl border border-[#333] max-h-[90vh] flex flex-col">
+ <div class="flex justify-between items-center mb-4 flex-none">
+ <h2 class="text-xl font-bold gradient-text">免责声明</h2>
+ <button onclick="closeDisclaimerModal()" class="text-gray-400 hover:text-white text-2xl transition-colors flex-shrink-0">&times;</button>
+ </div>
+ <div class="overflow-auto flex-1 min-h-0 text-gray-300">
+ <div class="space-y-4">
+ <p>欢迎使用 LibreTV,请您在使用本站前仔细阅读以下内容:</p>
+ <p>1. LibreTV 仅提供视频搜索服务,不直接提供、存储或上传任何视频内容。所有搜索结果均来自第三方公开接口。</p>
+ <p>2. 用户在使用本站服务时,须遵守相关法律法规,不得利用搜索结果从事侵权行为,如下载、传播未经授权的作品等。</p>
+ <p>3. 若您发现搜索结果中存在侵犯您合法权益的内容,请通过邮箱 [email protected] 向我们反馈,我们将及时处理。</p>
+ </div>
+ <div class="mt-6 flex justify-center">
+ <button onclick="acceptDisclaimer()" class="px-6 py-2 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-medium rounded-lg hover:opacity-90 transition-opacity">
+ 我已阅读并同意
+ </button>
+ </div>
+ </div>
+ </div>
+ </div>
+
<!-- 详情模态框 -->
<div id="modal" class="fixed inset-0 bg-black/95 hidden flex items-center justify-center transition-opacity duration-300">
<div class="bg-[#111] p-8 rounded-lg w-11/12 max-w-4xl border border-[#333] max-h-[90vh] flex flex-col">
diff --git a/js/app.js b/js/app.js
index 40139fa..e8fba1f 100644
--- a/js/app.js
+++ b/js/app.js
@@ -56,6 +56,9 @@ document.addEventListener('DOMContentLoaded', function() {
// 初始检查成人API选中状态
setTimeout(checkAdultAPIsSelected, 100);
+
+ // 检查并显示免责声明弹窗
+ checkAndShowDisclaimer();
});
// 初始化API复选框
@@ -259,9 +262,6 @@ function editCustomApi(index) {
// 替换表单按钮操作
const buttonContainer = form.querySelector('div:last-child');
buttonContainer.innerHTML = `
- <button onclick="updateCustomApi(${index})" class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded text-xs">更新</button>
- <button onclick="cancelEditCustomApi()" class="bg-[#444] hover:bg-[#555] text-white px-3 py-1 rounded text-xs">取消</button>
- `;
}
}