fix: CSP connect-src web.archive.org, Clipboard ohne Permission-Dialog
This commit is contained in:
@@ -94,11 +94,17 @@ export default function PaywallKiller() {
|
||||
setTimeout(() => inputRef.current?.focus(), 50);
|
||||
}
|
||||
|
||||
async function handlePaste() {
|
||||
try {
|
||||
const text = await navigator.clipboard.readText();
|
||||
if (text) setInputUrl(text.trim());
|
||||
} catch { inputRef.current?.focus(); }
|
||||
function handlePaste() {
|
||||
// Fokus ins Input setzen und nativen Paste auslösen – kein Permission-Dialog
|
||||
const input = inputRef.current;
|
||||
if (!input) return;
|
||||
input.focus();
|
||||
// execCommand('paste') funktioniert auf Android ohne Clipboard-Permission
|
||||
const ok = document.execCommand('paste');
|
||||
if (!ok) {
|
||||
// Fallback: nur fokussieren, User kann selbst einfügen
|
||||
input.select();
|
||||
}
|
||||
}
|
||||
|
||||
const isChecking = status === 'checking';
|
||||
|
||||
Reference in New Issue
Block a user