Bridge pages: inside the ad viewer the button opens a new tab, so an offer that refuses framing no longer shows 'refused to connect' (reported for prenet.world, 2026-11-23); pt.js?v=3
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
var lsid = /^[a-z0-9]{6,20}$/i.test(P.lsid || '') ? P.lsid : '';
|
||||
document.querySelectorAll('a[data-cta]').forEach(function (a) {
|
||||
try { var u = new URL(a.href); for (var k in P) if (!u.searchParams.has(k)) u.searchParams.set(k, P[k]); a.href = u.toString(); } catch (e) {}
|
||||
// inside the ad viewer (a sandboxed frame with no top navigation) the button opens a new tab: an offer that refuses framing
|
||||
// (X-Frame-Options: DENY) otherwise shows "refused to connect" in the frame (2026-11-23). Opened directly, the page is unchanged.
|
||||
try { if (window.top !== window) { a.target = '_blank'; a.rel = 'noopener'; } } catch (e) { a.target = '_blank'; a.rel = 'noopener'; }
|
||||
a.addEventListener('click', function () { try { navigator.sendBeacon('/api/p/' + slug + '/hit', new Blob([JSON.stringify({ k: 'cta' })], { type: 'application/json' })); } catch (e) {} });
|
||||
});
|
||||
// the built-in form (.ls-form) usually arrives with the lsid filled by the server; this is the fallback. A pasted
|
||||
|
||||
Reference in New Issue
Block a user