Auto-deploy: 2026-05-17 23:17:07

This commit is contained in:
Hamza-Ayed
2026-05-17 23:17:07 +03:00
parent a7a782c422
commit 3ac8260c1d
2 changed files with 24 additions and 15 deletions

View File

@@ -638,6 +638,17 @@
</div>
`;
// Attach inline copy button listeners
if (tab === 'qa') {
pane.querySelectorAll('.lja-qa-copy-btn').forEach(btn => {
btn.addEventListener('click', function() {
navigator.clipboard.writeText(this.getAttribute('data-answer'));
this.textContent = '✅';
setTimeout(() => this.textContent = '📋', 1200);
});
});
}
copyBtn.style.display = 'block';
// Show auto-fill button for Q&A tab
@@ -810,12 +821,7 @@ Brief honest assessment of this opportunity for my profile`
<div style="font-weight: 600; font-size: 12px; color: #aaa; margin-bottom: 4px;">❓ ${q}</div>
<div style="display: flex; align-items: center; gap: 8px;">
<div style="color: #4caf50; font-size: 14px; font-weight: 500; flex: 1;" id="lja-qa-answer-${idx}">💡 ${a}</div>
<button onclick="
const text = document.getElementById('lja-qa-answer-${idx}').textContent.replace('💡 ', '');
navigator.clipboard.writeText(text);
this.textContent = '✅';
setTimeout(() => this.textContent = '📋', 1200);
" style="background: rgba(108,99,255,0.2); border: none; border-radius: 4px; padding: 4px 8px; cursor: pointer; color: #b0b0ff; font-size: 14px; flex-shrink: 0;" title="Copy answer">📋</button>
<button class="lja-qa-copy-btn" data-answer="${safeAnswer}" style="background: rgba(108,99,255,0.2); border: none; border-radius: 4px; padding: 4px 8px; cursor: pointer; color: #b0b0ff; font-size: 14px; flex-shrink: 0;" title="Copy answer">📋</button>
</div>
</div>`;
});
@@ -1056,7 +1062,12 @@ Brief honest assessment of this opportunity for my profile`
let results;
try {
results = JSON.parse(resultText);
const match = resultText.match(/\[[\s\S]*\]/);
if (match) {
results = JSON.parse(match[0]);
} else {
results = JSON.parse(resultText);
}
} catch(e) {
console.error(resultText);
throw new Error('Failed to parse AI response');