Pokemon Stock Monitor - Initial commit
Chrome extension for PokemonCenter monitoring with Discord notifications. Includes Python scripts for Target monitoring. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,254 @@
|
||||
<!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 label {
|
||||
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 (min)</label>
|
||||
<input type="number" id="interval" min="1" max="60" value="1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="toggle-row">
|
||||
<label>Monitor Enabled</label>
|
||||
<div class="toggle">
|
||||
<input type="checkbox" id="enabled" checked>
|
||||
<span class="slider"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle-row">
|
||||
<label>Notify New Products</label>
|
||||
<div class="toggle">
|
||||
<input type="checkbox" id="notifyNew" checked>
|
||||
<span class="slider"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toggle-row">
|
||||
<label>Notify Restocks</label>
|
||||
<div class="toggle">
|
||||
<input type="checkbox" id="notifyRestock" checked>
|
||||
<span class="slider"></span>
|
||||
</div>
|
||||
</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>
|
||||
Reference in New Issue
Block a user