cddae24e34
Changed toggle wrapper from div to label so clicking the slider visual actually toggles the checkbox. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
256 lines
5.7 KiB
HTML
256 lines
5.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<style>
|
|
body {
|
|
width: 320px;
|
|
padding: 15px;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: #1a1a2e;
|
|
color: #eee;
|
|
margin: 0;
|
|
}
|
|
h1 {
|
|
font-size: 16px;
|
|
margin: 0 0 15px 0;
|
|
color: #ffcb05;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
h1 span {
|
|
font-size: 20px;
|
|
}
|
|
.section {
|
|
margin-bottom: 15px;
|
|
}
|
|
label {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: #aaa;
|
|
margin-bottom: 4px;
|
|
}
|
|
input[type="text"], input[type="number"], textarea {
|
|
width: 100%;
|
|
padding: 8px;
|
|
border: 1px solid #333;
|
|
border-radius: 4px;
|
|
background: #16213e;
|
|
color: #eee;
|
|
font-size: 13px;
|
|
box-sizing: border-box;
|
|
}
|
|
input:focus, textarea:focus {
|
|
outline: none;
|
|
border-color: #ffcb05;
|
|
}
|
|
textarea {
|
|
height: 60px;
|
|
resize: vertical;
|
|
}
|
|
.row {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
.row > div {
|
|
flex: 1;
|
|
}
|
|
.toggle-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 0;
|
|
}
|
|
.toggle-row span {
|
|
margin: 0;
|
|
color: #eee;
|
|
font-size: 13px;
|
|
}
|
|
.toggle {
|
|
position: relative;
|
|
width: 44px;
|
|
height: 24px;
|
|
}
|
|
.toggle input {
|
|
opacity: 0;
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
.slider {
|
|
position: absolute;
|
|
cursor: pointer;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: #333;
|
|
transition: .3s;
|
|
border-radius: 24px;
|
|
}
|
|
.slider:before {
|
|
position: absolute;
|
|
content: "";
|
|
height: 18px;
|
|
width: 18px;
|
|
left: 3px;
|
|
bottom: 3px;
|
|
background-color: #eee;
|
|
transition: .3s;
|
|
border-radius: 50%;
|
|
}
|
|
input:checked + .slider {
|
|
background-color: #00c853;
|
|
}
|
|
input:checked + .slider:before {
|
|
transform: translateX(20px);
|
|
}
|
|
button {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
.btn-primary {
|
|
background: #ffcb05;
|
|
color: #1a1a2e;
|
|
}
|
|
.btn-primary:hover {
|
|
background: #ffd633;
|
|
}
|
|
.btn-secondary {
|
|
background: #333;
|
|
color: #eee;
|
|
margin-top: 8px;
|
|
}
|
|
.btn-secondary:hover {
|
|
background: #444;
|
|
}
|
|
.btn-danger {
|
|
background: #c62828;
|
|
color: #fff;
|
|
margin-top: 8px;
|
|
}
|
|
.btn-danger:hover {
|
|
background: #d32f2f;
|
|
}
|
|
.stats {
|
|
background: #16213e;
|
|
padding: 10px;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
margin-bottom: 15px;
|
|
}
|
|
.stats-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 4px;
|
|
}
|
|
.stats-row:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
.status-dot {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
margin-right: 6px;
|
|
}
|
|
.status-dot.active {
|
|
background: #00c853;
|
|
}
|
|
.status-dot.inactive {
|
|
background: #c62828;
|
|
}
|
|
.saved-msg {
|
|
text-align: center;
|
|
color: #00c853;
|
|
font-size: 12px;
|
|
margin-top: 8px;
|
|
opacity: 0;
|
|
transition: opacity 0.3s;
|
|
}
|
|
.saved-msg.show {
|
|
opacity: 1;
|
|
}
|
|
small {
|
|
color: #666;
|
|
font-size: 11px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1><span>⚡</span> Pokemon Stock Monitor</h1>
|
|
|
|
<div class="stats" id="stats">
|
|
<div class="stats-row">
|
|
<span>Status:</span>
|
|
<span><span class="status-dot active" id="statusDot"></span><span id="statusText">Active</span></span>
|
|
</div>
|
|
<div class="stats-row">
|
|
<span>Products tracked:</span>
|
|
<span id="productCount">0</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<label>Discord Webhook URL</label>
|
|
<input type="text" id="webhook" placeholder="https://discord.com/api/webhooks/...">
|
|
</div>
|
|
|
|
<div class="section">
|
|
<label>URLs to Monitor (one per line)</label>
|
|
<textarea id="urls" placeholder="https://www.pokemoncenter.com/category/tcg-cards"></textarea>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<label>Keywords (comma separated, leave empty for all)</label>
|
|
<input type="text" id="keywords" placeholder="chaos rising, booster, etb">
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div>
|
|
<label>Check Interval (seconds)</label>
|
|
<input type="number" id="interval" min="60" max="300" value="90">
|
|
<small>Min 60 sec to avoid bans. Recommended: 90 sec</small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<div class="toggle-row">
|
|
<span>Monitor Enabled</span>
|
|
<label class="toggle" for="enabled">
|
|
<input type="checkbox" id="enabled" checked>
|
|
<span class="slider"></span>
|
|
</label>
|
|
</div>
|
|
<div class="toggle-row">
|
|
<span>Notify New Products</span>
|
|
<label class="toggle" for="notifyNew">
|
|
<input type="checkbox" id="notifyNew" checked>
|
|
<span class="slider"></span>
|
|
</label>
|
|
</div>
|
|
<div class="toggle-row">
|
|
<span>Notify Restocks</span>
|
|
<label class="toggle" for="notifyRestock">
|
|
<input type="checkbox" id="notifyRestock" checked>
|
|
<span class="slider"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<button class="btn-primary" id="saveBtn">Save Settings</button>
|
|
<button class="btn-secondary" id="checkNowBtn">Check Now</button>
|
|
<button class="btn-danger" id="clearBtn">Clear Product History</button>
|
|
|
|
<div class="saved-msg" id="savedMsg">Settings saved!</div>
|
|
|
|
<script src="popup.js"></script>
|
|
</body>
|
|
</html>
|