INNER CODE UNIT · JavaScript
myOp
yashab-cyber/opendroid · website/js/main.js:101
const myOp = ++opId;
const text = codeEl.textContent;
let copied = false;
try {
await navigator.clipboard.writeText(text);
copied = true;
} catch (e) {
// Clipboard API unavailable (older browser / insecure context) — fall back.
const ta = document.createElement('textarea');
ta.value = text;
ta.style.position = 'fixed';
ta.style.opacity = '0';
document.body.appendChild(ta);
ta.select();
try { copied = document.execCommand('copy'); } catch (e2) { copied = false; }
document.body.removeChild(ta);
}
// A later click may have already started while this one was awaiting