Update offscreen.js (#1134)

This commit is contained in:
Leendert de Borst
2025-08-23 17:41:28 +02:00
committed by Leendert de Borst
parent b638e3375d
commit 51287c85dc

View File

@@ -27,10 +27,8 @@ const textEl = document.querySelector('#text');
async function clearClipboard() {
try {
// Use execCommand to clear clipboard
console.log(textEl);
textEl.value = '\n';
textEl.select();
console.log(textEl.value);
document.execCommand('copy');
} catch (error) {
console.error('[OFFSCREEN] Error clearing clipboard:', error);