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

Content deleted Content added
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 187:
#ca-claude a:hover {
text-decoration: underline !important;
}
/* Improved layout adjustment - target root containers more precisely */
body.claude-sidebar-visible {
/* Don't apply margin to body directly to avoid conflicts */
}
/* Vector 2022 theme - adjust the main wrapper */
body.claude-sidebar-visible .mw-page-container {
margin-right: ${this.sidebarWidth} !important;
box-sizing: border-box !important;
}
/* Vector 2022 - prevent content from being constrained by max-width */
body.claude-sidebar-visible .mw-page-container-inner {
max-width: none !important;
margin-right: 0 !important;
}
/* Legacy Vector and other themes */
body.claude-sidebar-visible #globalWrapper {
margin-right: ${this.sidebarWidth} !important;
box-sizing: border-box;
}
/* Header adjustments for Vector theme */
body.claude-sidebar-visible .vector-header {
right: ${this.sidebarWidth} !important;
width: calc(100% - ${this.sidebarWidth}) !important;
box-sizing: border-box;
}
/* Sticky header */
body.claude-sidebar-visible .vector-sticky-header {
right: ${this.sidebarWidth} !important;
width: calc(100% - ${this.sidebarWidth}) !important;
box-sizing: border-box;
}
/* Legacy header */
body.claude-sidebar-visible #mw-head {
right: ${this.sidebarWidth} !important;
width: calc(100% - ${this.sidebarWidth}) !important;
box-sizing: border-box;
}
/* MonoBook and other legacy themes */
body.claude-sidebar-visible #content {
margin-right: ${this.sidebarWidth} !important;
box-sizing: border-box;
}
/* Timeless theme */
body.claude-sidebar-visible .mw-body {
margin-right: ${this.sidebarWidth} !important;
box-sizing: border-box;
}
Line 254 ⟶ 198:
/* Hidden state styles */
body.claude-sidebar-hidden #claude-proofreader-sidebar {
display: none;
}
body.claude-sidebar-hidden #ca-claude {
display: list-item !important;
}
/* Reset all margins when sidebar is hidden */
body:not(.claude-sidebar-visible) .mw-page-container {
margin-right: 0 !important;
}
body:not(.claude-sidebar-visible) .mw-page-container-inner {
max-width: 960px !important;
}
body:not(.claude-sidebar-visible) #globalWrapper {
margin-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;
}
body:not(.claude-sidebar-visible) #content,
body:not(.claude-sidebar-visible) .mw-body {
margin-right: 0 !important;
}
`;
Line 377 ⟶ 300:
style.setAttribute('data-claude-proofreader', 'true');
style.textContent = `
/* Vector 2022 theme - adjustcomprehensive the main wrapperapproach */
body.claude-sidebar-visible .mw-page-container {
margin-right: ${this.sidebarWidth} !important;
Line 383 ⟶ 306:
}
/* Vector 2022 - preventmain content from being constrained by max-widthwrapper */
body.claude-sidebar-visible .mw-page-container-inner {
margin-right: 0 !important;
padding-right: 0 !important;
max-width: none !important;
}
/* Vector 2022 - content area */
body.claude-sidebar-visible .mw-content-container {
max-width: none !important;
margin-right: 0 !important;
}
/* Vector 2022 - article content */
body.claude-sidebar-visible .mw-body {
margin-right: 0 !important;
max-width: none !important;
}
/* Vector 2022 - main content */
body.claude-sidebar-visible #content {
margin-right: 0 !important;
max-width: none !important;
}
Line 401 ⟶ 343:
right: ${this.sidebarWidth} !important;
width: calc(100% - ${this.sidebarWidth}) !important;
box-sizing: border-box;
}
/* Legacy themes */
body.claude-sidebar-visible #content,
body.claude-sidebar-visible .mw-body {
margin-right: ${this.sidebarWidth} !important;
box-sizing: border-box;
}
Line 435 ⟶ 370:
}
adjustMainContent() {
// Only apply layout changes when sidebar is actually visible
if (this.isVisible) {
document.body.classList.add('claude-sidebar-visible');