User:Polygnotus/Scripts/Claude4.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 187:
#ca-claude a:hover {
text-decoration: underline !important;
}
/* Universal theme compatibility - target only the main containers */
body.claude-sidebar-visible {
margin-right: ${this.sidebarWidth} !important;
}
/* Target only the outermost containers to avoid stacking margins */
body.claude-sidebar-visible .mw-page-container,
body.claude-sidebar-visible #globalWrapper {
margin-right: 0 !important;
padding-right: ${this.sidebarWidth} !important;
box-sizing: border-box !important;
}
/* For fixed/absolute positioned elements like headers */
body.claude-sidebar-visible .vector-header,
body.claude-sidebar-visible .vector-sticky-header,
body.claude-sidebar-visible #mw-head {
right: ${this.sidebarWidth} !important;
width: calc(100% - ${this.sidebarWidth}) !important;
}
Line 219 ⟶ 198:
/* Hidden state styles */
body.claude-sidebar-hidden #claude-proofreader-sidebar {
display: none;
}
body.claude-sidebar-hidden #ca-claude {
display: list-item !important;
}
/* Reset margins when sidebar is hidden */
body:not(.claude-sidebar-visible) {
margin-right: 0 !important;
}
body:not(.claude-sidebar-visible) .mw-page-container,
body:not(.claude-sidebar-visible) #globalWrapper {
margin-right: 0 !important;
padding-right: 0 !important;
}
body:not(.claude-sidebar-visible) .vector-header,
body:not(.claude-sidebar-visible) .vector-sticky-header,
body:not(.claude-sidebar-visible) #mw-head {
right: 0 !important;
width: 100% !important;
}
`;
Line 337 ⟶ 300:
style.setAttribute('data-claude-proofreader', 'true');
style.textContent = `
body.claude/* Vector 2022 theme -sidebar-visible {comprehensive approach */
body.claude-sidebar-visible .mw-page-container, {
margin-right: ${this.sidebarWidth} !important;
box-sizing: border-box !important;
}
body.claude-sidebar-visible .mw-page-container,
body.claude/* Vector 2022 -sidebar-visible #globalWrappermain content wrapper {*/
body.claude-sidebar-visible #.mw-headpage-container-inner {
margin-right: 0 !important;
padding-right: ${this.sidebarWidth}0 !important;
boxmax-sizingwidth: border-boxnone !important;
}
/* ResetVector margins2022 when- sidebarcontent is hiddenarea */
body.claude-sidebar-visible .vectormw-stickycontent-header,container {
max-width: calc(100% - ${this.sidebarWidth})none !important;
margin-right: 0 !important;
}
/* Vector 2022 - article content */
body.claude-sidebar-visible .mw-body {
paddingmargin-right: ${this.sidebarWidth}0 !important;
marginmax-rightwidth: 0none !important;
}
/* Vector 2022 - main content */
body.claude-sidebar-visible .vector-header,#content {
margin-right: ${this.sidebarWidth}0 !important;
marginmax-rightwidth: 0none !important;
}
/* Legacy Vector and other themes */
body.claude-sidebar-visible #globalWrapper {
margin-right: ${this.sidebarWidth} !important;
paddingbox-rightsizing: 0 !importantborder-box;
}
}
/* Header adjustments */
body.claude-sidebar-visible .vector-header,
body.claude-sidebar-visible .vector-sticky-header,
Line 351 ⟶ 343:
right: ${this.sidebarWidth} !important;
width: calc(100% - ${this.sidebarWidth}) !important;
rightbox-sizing: 0 !importantborder-box;
}
`;
Line 377 ⟶ 370:
}
adjustMainContent() {
// Only apply layout changes when sidebar is actually visible
if (this.isVisible) {
document.body.classList.add('claude-sidebar-visible');