BibliographyBackbone: Difference between revisions
From Illustrations in German Translations of Mark Twain's Works
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
<button id="copyBtn | |||
<button id="copyBtn" style=" | |||
background-color: #008CBA; | background-color: #008CBA; | ||
color: white; | color: white; | ||
| Line 26: | Line 27: | ||
overflow: auto; | overflow: auto; | ||
"></textarea> | "></textarea> | ||
<script> | |||
(function() { | |||
async function copyRaw() { | |||
console.log('copyRaw aufgerufen'); | |||
const output = document.getElementById('bibOutput'); | |||
if (!output) { | |||
console.error('bibOutput textarea nicht gefunden'); | |||
return; | |||
} | |||
output.value = 'Lade...'; | |||
try { | |||
const response = await fetch('/BibliographyData?action=raw'); | |||
const text = await response.text(); | |||
output.value = text; | |||
console.log('Fertig - ' + text.length + ' Zeichen'); | |||
} catch (error) { | |||
output.value = 'ERROR: ' + error.message; | |||
console.error('Fehler:', error); | |||
} | |||
} | |||
document.addEventListener('DOMContentLoaded', function() { | |||
const btn = document.getElementById('copyBtn'); | |||
if (btn) { | |||
btn.addEventListener('click', copyRaw); | |||
console.log('Button bereit'); | |||
} | |||
}); | |||
})(); | |||
</script> | |||
</html> | </html> | ||
Revision as of 00:45, 12 May 2026
Bibliography Generator