Files
blurweb/popup.html
2025-12-10 18:18:30 +08:00

283 lines
6.0 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BlurText</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 320px;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #333;
}
.container {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
h1 {
font-size: 20px;
margin-bottom: 8px;
color: #667eea;
text-align: center;
}
.subtitle {
font-size: 12px;
color: #888;
text-align: center;
margin-bottom: 20px;
}
.status {
background: #f0f4ff;
border-left: 4px solid #667eea;
padding: 12px;
margin-bottom: 20px;
border-radius: 4px;
font-size: 13px;
color: #555;
}
.status.active {
background: #e8f5e9;
border-left-color: #4caf50;
}
.controls {
display: flex;
flex-direction: column;
gap: 12px;
}
button {
padding: 12px 20px;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
button:active {
transform: translateY(0);
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-secondary {
background: #f5f5f5;
color: #666;
}
.btn-secondary:hover {
background: #e0e0e0;
}
.intensity-control {
margin-bottom: 20px;
}
.intensity-control label {
display: block;
font-size: 13px;
color: #666;
margin-bottom: 8px;
font-weight: 500;
}
.intensity-slider {
display: flex;
align-items: center;
gap: 12px;
}
input[type="range"] {
flex: 1;
height: 6px;
border-radius: 3px;
background: #e0e0e0;
outline: none;
-webkit-appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
background: #667eea;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
input[type="range"]::-moz-range-thumb {
width: 18px;
height: 18px;
border-radius: 50%;
background: #667eea;
cursor: pointer;
border: none;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.intensity-value {
font-size: 14px;
font-weight: 600;
color: #667eea;
min-width: 35px;
text-align: center;
}
.mode-selector {
margin-bottom: 20px;
}
.mode-selector label {
display: block;
font-size: 13px;
color: #666;
margin-bottom: 8px;
font-weight: 500;
}
.mode-buttons {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.mode-btn {
padding: 10px;
border: 2px solid #e0e0e0;
background: white;
border-radius: 6px;
font-size: 13px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.mode-btn:hover {
border-color: #667eea;
transform: none;
box-shadow: none;
}
.mode-btn.active {
border-color: #667eea;
background: #f0f4ff;
color: #667eea;
}
.mode-btn .mode-icon {
font-size: 20px;
}
.mode-btn .mode-label {
font-size: 12px;
font-weight: 500;
}
.usage-tip {
background: #fff9e6;
border-left: 4px solid #ffc107;
padding: 10px;
margin-top: 20px;
border-radius: 4px;
font-size: 12px;
color: #666;
line-height: 1.5;
}
.icon {
font-size: 16px;
}
</style>
</head>
<body>
<div class="container">
<h1>🔒 BlurText</h1>
<p class="subtitle">屏幕分享隐私保护</p>
<div class="status" id="status">
<span class="icon">💡</span> 点击下方按钮开始使用
</div>
<div class="mode-selector">
<label>模糊模式</label>
<div class="mode-buttons">
<button class="mode-btn active" id="modeElement" data-mode="element">
<span class="mode-icon">🖱️</span>
<span class="mode-label">元素模式</span>
</button>
<button class="mode-btn" id="modeSelection" data-mode="selection">
<span class="mode-icon">📝</span>
<span class="mode-label">文本选择</span>
</button>
</div>
</div>
<div class="intensity-control">
<label for="blurIntensity">模糊强度</label>
<div class="intensity-slider">
<input type="range" id="blurIntensity" min="5" max="20" value="10" step="1">
<span class="intensity-value" id="intensityValue">10px</span>
</div>
</div>
<div class="controls">
<button class="btn-primary" id="toggleBlur">
<span class="icon">🖱️</span>
<span id="toggleText">开启模糊模式</span>
</button>
<button class="btn-secondary" id="clearAll">
<span class="icon">🗑️</span>
清除所有模糊
</button>
</div>
<div class="usage-tip">
<strong>使用方法:</strong><br>
<span id="usageTip">
<strong>元素模式:</strong><br>
1. 点击"开启模糊模式"<br>
2. 鼠标悬停元素查看高亮<br>
3. 点击元素进行模糊<br>
4. 再次点击取消模糊
</span>
</div>
</div>
<script src="popup.js"></script>
</body>
</html>