init commit
This commit is contained in:
233
popup.html
Normal file
233
popup.html
Normal file
@@ -0,0 +1,233 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Page Editor</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 350px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
background-color: #f5f5f5;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
margin-bottom: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.toggle-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: white;
|
||||
padding: 12px 16px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 16px;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.toggle-label {
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Toggle switch */
|
||||
.toggle-switch {
|
||||
position: relative;
|
||||
width: 50px;
|
||||
height: 28px;
|
||||
background-color: #ccc;
|
||||
border-radius: 14px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.toggle-switch.enabled {
|
||||
background-color: #4285f4;
|
||||
}
|
||||
|
||||
.toggle-switch::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
transition: left 0.3s ease;
|
||||
}
|
||||
|
||||
.toggle-switch.enabled::after {
|
||||
left: 24px;
|
||||
}
|
||||
|
||||
.status-text {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-top: 8px;
|
||||
padding: 8px 12px;
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.status-text.active {
|
||||
color: #2e7d32;
|
||||
background-color: #e8f5e9;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #666;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 8px;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.edit-info {
|
||||
background-color: #e3f2fd;
|
||||
border-left: 4px solid #4285f4;
|
||||
padding: 12px;
|
||||
margin-bottom: 16px;
|
||||
border-radius: 2px;
|
||||
font-size: 12px;
|
||||
color: #1565c0;
|
||||
line-height: 1.5;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.edit-info.visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 8px;
|
||||
border: 1px solid #ddd;
|
||||
background-color: white;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: #f9f9f9;
|
||||
border-color: #4285f4;
|
||||
color: #4285f4;
|
||||
}
|
||||
|
||||
button.primary {
|
||||
background-color: #4285f4;
|
||||
color: white;
|
||||
border-color: #4285f4;
|
||||
}
|
||||
|
||||
button.primary:hover {
|
||||
background-color: #3367d6;
|
||||
border-color: #3367d6;
|
||||
}
|
||||
|
||||
button.danger {
|
||||
background-color: #f44336;
|
||||
color: white;
|
||||
border-color: #f44336;
|
||||
}
|
||||
|
||||
button.danger:hover {
|
||||
background-color: #da190b;
|
||||
border-color: #da190b;
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
#editCount {
|
||||
font-weight: 600;
|
||||
color: #4285f4;
|
||||
}
|
||||
|
||||
.keyboard-shortcuts {
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.keyboard-shortcuts.visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.keyboard-shortcuts code {
|
||||
background-color: #fff;
|
||||
padding: 2px 6px;
|
||||
border-radius: 2px;
|
||||
font-family: 'Monaco', 'Courier New', monospace;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>✏️ Page Editor</h1>
|
||||
|
||||
<div class="toggle-container">
|
||||
<div class="toggle-label">Edit Mode</div>
|
||||
<div class="toggle-switch" id="editModeToggle"></div>
|
||||
</div>
|
||||
<div class="status-text" id="statusText">Disabled</div>
|
||||
|
||||
<div class="edit-info" id="editInfo">
|
||||
When enabled, you can click any text to edit it. Changes save automatically when you click away.
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">Status</div>
|
||||
<div id="editStatus">No edits yet</div>
|
||||
</div>
|
||||
|
||||
<div class="section" id="editActionsSection" style="display: none;">
|
||||
<div class="section-title">Actions</div>
|
||||
<button class="primary" id="saveAllBtn">💾 Save All Changes</button>
|
||||
<button id="clearAllBtn">🔄 Clear All Edits</button>
|
||||
<button id="exportBtn">📥 Export Edits</button>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<div class="section-title">Keyboard Shortcuts</div>
|
||||
<div class="keyboard-shortcuts" id="keyboardShortcuts">
|
||||
<div><code>Ctrl+S</code> Save current edit</div>
|
||||
<div><code>Ctrl+Shift+S</code> Save all edits</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="popup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user