This commit is contained in:
sion
2026-04-21 08:09:45 +08:00
parent 0066615054
commit 5264043c21
1831 changed files with 15376 additions and 39973 deletions

View File

@@ -33,6 +33,19 @@
<link rel="manifest" href="manifest.json">
<style>
/* 防截图/录屏保护 */
body {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-touch-callout: none;
}
@media print {
body { display: none !important; }
}
/* 启动页样式 */
.splash-container {
position: fixed;
@@ -207,5 +220,37 @@
document.body.appendChild(script);
}
</script>
<!-- 防截图/录屏保护 -->
<script>
if (!isDev) {
// 禁止右键菜单
document.addEventListener('contextmenu', function(e) { e.preventDefault(); });
// 禁止常见快捷键Ctrl+P打印, Ctrl+S保存, Ctrl+Shift+I开发者工具, F12
document.addEventListener('keydown', function(e) {
if ((e.ctrlKey && e.key === 'p') ||
(e.ctrlKey && e.key === 's') ||
(e.ctrlKey && e.shiftKey && e.key === 'I') ||
e.key === 'F12' ||
e.key === 'PrintScreen') {
e.preventDefault();
return false;
}
});
// 窗口失焦时模糊内容,防止后台截图
var blurOverlay = document.createElement('div');
blurOverlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:#000;z-index:99999;display:none;';
document.body.appendChild(blurOverlay);
window.addEventListener('blur', function() {
blurOverlay.style.display = 'block';
});
window.addEventListener('focus', function() {
blurOverlay.style.display = 'none';
});
}
</script>
</body>
</html>