Revert inline styles approach - wrong solution

This commit is contained in:
Russell Ballestrini 2025-11-10 16:43:41 -05:00
parent 4de5b27700
commit 4ff5740559

View file

@ -121,20 +121,6 @@ function addCodeBlockCopyButtons(element) {
copyBtn.className = "uncloseai-code-copy-btn";
copyBtn.textContent = "📋";
copyBtn.title = "Copy code";
// Defensive inline styles to ensure visibility on all sites
copyBtn.style.cssText = `
display: inline-block;
visibility: visible;
opacity: 0.9;
background: rgba(0, 0, 0, 0.6);
color: white;
border: 1px solid rgba(255, 255, 255, 0.3);
padding: 4px 8px;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
white-space: nowrap;
`;
copyBtn.onclick = async () => {
try {
@ -155,20 +141,6 @@ function addCodeBlockCopyButtons(element) {
runBtn.className = "uncloseai-code-copy-btn"; // Reuse same styling
runBtn.textContent = "▶";
runBtn.title = "Run code in sandbox";
// Defensive inline styles to ensure visibility on all sites
runBtn.style.cssText = `
display: inline-block;
visibility: visible;
opacity: 0.9;
background: rgba(0, 0, 0, 0.6);
color: white;
border: 1px solid rgba(255, 255, 255, 0.3);
padding: 4px 8px;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
white-space: nowrap;
`;
// Detect language from code block class
let language = 'python'; // Default