Content deleted Content added
Polygnotus (talk | contribs) improvements by {{ping|Sohom Datta}} |
Polygnotus (talk | contribs) clear results button => remove api key -- Claude: "The bug was that widthPx was not defined in the showSidebar() method scope - it was only defined in the handleMouseMove function within makeResizable(). I changed it to use this.sidebarWidth instead, which is the correct variable that contains the sidebar width." |
||
Line 30:
<button id="claude-proofread-btn" ${!this.apiKey ? 'style="display:none"' : ''}>Proofread Article</button>
<button id="claude-change-key-btn" ${!this.apiKey ? 'style="display:none"' : ''}>Change Key</button>
<button id="claude-
</div>
<div id="claude-results">
Line 122:
background: #ccc;
cursor: not-allowed;
}
#claude-remove-key-btn {
background: #d33 !important;
}
#claude-remove-key-btn:hover {
background: #b52d2d !important;
}
#claude-results {
Line 287 ⟶ 293:
if ( mw.config.get( 'skin' ) === 'vector' ) {
const head = document.querySelector( '#mw-head' );
head.style.width = `calc(100% - ${
head.style.right =
}
Line 333 ⟶ 339:
this.proofreadArticle();
});
document.getElementById('claude-
this.
});
}
Line 347 ⟶ 353:
document.getElementById('claude-proofread-btn').style.display = 'inline-block';
document.getElementById('claude-change-key-btn').style.display = 'inline-block';
this.updateStatus('API key set successfully!');
}
}
if (confirm('Are you sure you want to remove the stored API key?')) {
document.getElementById('claude-clear-btn').style.display = 'none';▼
document.getElementById('claude-set-key-btn').style.display = 'inline-block';
document.getElementById('claude-change-key-btn').style.display = 'none';
document.getElementById('claude-remove-key-btn').style.display = 'none';
this.updateStatus('API key removed successfully!');
this.updateOutput('');
}
}
updateStatus(message, isError = false) {
Line 372 ⟶ 387:
outputEl.textContent = content;
}
// Store results
if (content) {
this.currentResults = content;
localStorage.setItem('claude_current_results', content);
▲ document.getElementById('claude-clear-btn').style.display = 'inline-block';
}
}
|