fix: window.open durch <a target=_blank> ersetzt (PWA-kompatibel)
This commit is contained in:
@@ -34,10 +34,6 @@ export default function PaywallKiller() {
|
||||
setErrMsg('');
|
||||
}
|
||||
|
||||
function handleOpenArchive() {
|
||||
window.open(archiveUrl, '_blank');
|
||||
}
|
||||
|
||||
async function handlePdf() {
|
||||
const urlToUse = snapshotUrl.trim() || archiveUrl;
|
||||
if (!urlToUse) return;
|
||||
@@ -136,10 +132,13 @@ export default function PaywallKiller() {
|
||||
Kopiere dann die URL aus der Adressleiste (sieht aus wie{' '}
|
||||
<span style={{ color: 'rgba(255,255,255,0.5)' }}>archive.ph/AbCdE</span>) und füge sie unten ein.
|
||||
</div>
|
||||
<button onClick={handleOpenArchive}
|
||||
style={{ ...S.btn(C.accent), width: '100%', fontSize: 13, marginBottom: 12 }}>
|
||||
<a
|
||||
href={archiveUrl}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
style={{ ...S.btn(C.accent), display: 'block', textAlign: 'center', textDecoration: 'none', width: '100%', boxSizing: 'border-box', fontSize: 13, marginBottom: 12 }}>
|
||||
🌐 archive.ph öffnen
|
||||
</button>
|
||||
</a>
|
||||
|
||||
{/* Snapshot-URL Eingabe */}
|
||||
<div style={{ ...S.head, marginBottom: 6, fontSize: 10 }}>SNAPSHOT-URL AUS ADRESSLEISTE (optional)</div>
|
||||
@@ -192,10 +191,10 @@ export default function PaywallKiller() {
|
||||
<div>
|
||||
<div style={{ color: C.error, fontFamily: 'monospace', fontSize: 12, marginBottom: errMsg.includes('CAPTCHA') ? 8 : 0 }}>{errMsg}</div>
|
||||
{errMsg.includes('CAPTCHA') && (
|
||||
<button onClick={handleOpenArchive}
|
||||
style={{ ...S.btn(C.accent), fontSize: 11 }}>
|
||||
<a href={archiveUrl} target="_blank" rel="noreferrer"
|
||||
style={{ ...S.btn(C.accent), display: 'inline-block', textDecoration: 'none', fontSize: 11 }}>
|
||||
🌐 archive.ph nochmal öffnen
|
||||
</button>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user