webext-dark-mode/popup.html
2025-11-22 08:53:53 +01:00

102 lines
No EOL
2.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<style>
body {
width: 200px;
padding: 10px;
font-family: sans-serif;
background-color: #f0f0f0;
color: #333;
display: flex;
flex-direction: column;
align-items: center;
}
h1 {
font-size: 16px;
margin-bottom: 15px;
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked+.slider {
background-color: #2196F3;
}
input:checked+.slider:before {
transform: translateX(26px);
}
</style>
</head>
<body>
<h1>Dark Mode</h1>
<div style="display: flex; flex-direction: column; align-items: center; width: 100%;">
<div
style="display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 5px;">
<span style="font-size: 14px;">Enable for Site</span>
<label class="switch">
<input type="checkbox" id="toggle">
<span class="slider"></span>
</label>
</div>
<p id="status"
style="font-size: 11px; color: #666; margin: 0 0 15px 0; text-align: right; width: 100%; min-height: 14px;">
</p>
<hr style="width: 100%; border: 0; border-top: 1px solid #ddd; margin: 0 0 15px 0;">
<div
style="display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 5px;">
<span style="font-size: 14px;">Sync with System</span>
<label class="switch">
<input type="checkbox" id="syncSystem">
<span class="slider"></span>
</label>
</div>
<p style="font-size: 11px; color: #888; margin: 0; text-align: left; line-height: 1.3;">
Only enable dark mode on saved sites when your system is in dark mode.
</p>
</div>
<script src="popup.js"></script>
</body>
</html>