Content deleted Content added
Polygnotus (talk | contribs) next to page instead of on top? |
Polygnotus (talk | contribs) No edit summary |
||
Line 15:
}
createUI() {
if (child.tagName !== 'SCRIPT') {▼
pageWrapper.appendChild(child);▼
}▼
});▼
// Create sidebar container
const sidebar = document.createElement('div');
Line 56 ⟶ 44:
const style = document.createElement('style');
style.textContent = `
body {▼
display: flex !important;▼
margin: 0 !important;▼
padding: 0 !important;▼
}▼
#claude-page-wrapper {▼
flex: 1;▼
min-width: 0;▼
transition: all 0.3s ease;▼
#claude-proofreader-sidebar {
width: ${this.sidebarWidth};
background: #fff;
border-left: 2px solid #0645ad;
box-shadow: -2px 0 8px rgba(0,0,0,0.1);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
font-size: 14px;
display: flex;
flex-direction: column;
transition: all 0.3s ease;
}
Line 197 ⟶ 178:
background: transparent;
cursor: ew-resize;
}
#claude-resize-handle:hover {
Line 212 ⟶ 194:
#ca-claude a:hover {
text-decoration: underline !important;
▲ }
▲ body {
margin-right: ${this.isVisible ? this.sidebarWidth : '0'} !important;
}
.claude-error {
Line 219 ⟶ 205:
padding: 8px;
border-radius: 4px;
▲ }
}
.claude-sidebar-hidden #claude-proofreader-sidebar {
Line 228 ⟶ 217:
`;
document.head.appendChild(style);
document.body.appendChild(pageWrapper);▼
document.body.appendChild(sidebar);
Line 284 ⟶ 270:
const widthPx = newWidth + 'px';
sidebar.style.width = widthPx;
document.body.style.marginRight = widthPx;
this.sidebarWidth = widthPx;
localStorage.setItem('claude_sidebar_width', widthPx);
Line 299 ⟶ 286:
document.body.classList.remove('claude-sidebar-hidden');
if (claudeTab) claudeTab.style.display = 'none';
document.body.style.marginRight = this.sidebarWidth;
this.isVisible = true;
Line 308 ⟶ 297:
document.body.classList.add('claude-sidebar-hidden');
if (claudeTab) claudeTab.style.display = 'list-item';
this.isVisible = false;
Line 313 ⟶ 303:
}
adjustMainContent() {
document.body.style.marginRight = this.sidebarWidth;
document.body.style.marginRight = '0';
}
attachEventListeners() {
|