PageSourceSearch

https://www.nn.de/js/multisite/frc/frc-20.13.0.js

js nn.de collected 2026-10-01 11:38:39 UTC 2,855 bytes, 14 lines download raw bytes

1
2const FRC_SITE_KEY=frcSiteKey;const FRIENDLY_CAPTCHA_SCRIPT_SRC='https://cdn.jsdelivr.net/npm/@friendlycaptcha/[email protected]/site.compat.min.js';const FRC_WIDGET_SELECTOR='#frcWidget';const FRC_TIMEOUT_INTERVAL=100;const FRC_DEFAULT_WAIT_TIMEOUT=3000;const CAPTCHA_COMPLETED="completed";let captchaThemeDefault='auto';function handleFriendlyCaptcha(frcVendorId,captchaDivId,captchaTheme){if(frcVendorId!=null&&!hasConsent(frcVendorId)){return;}
3const captchaDiv=document.getElementById(captchaDivId);if(captchaDiv){if(captchaTheme){captchaThemeDefault=captchaTheme;}
4loadFriendlyCaptchaScript(()=>initializeCaptcha(captchaDiv));}
5function loadFriendlyCaptchaScript(callback){const isScriptLoaded=document.head.querySelector(`script[src="${FRIENDLY_CAPTCHA_SCRIPT_SRC}"]`);if(!isScriptLoaded){document.head.appendChild(createScriptElement(FRIENDLY_CAPTCHA_SCRIPT_SRC));}
6callback();}
7function createScriptElement(src){const script=document.createElement('script');script.src=src;script.async=true;return script;}
8function initializeCaptcha(captchaDiv){waitForFrcaptcha(FRC_DEFAULT_WAIT_TIMEOUT).then(()=>addCaptchaWidgetIfMissing(captchaDiv)).catch((error)=>console.error(error.message));}
9function waitForFrcaptcha(timeout){return new Promise((resolve,reject)=>{const interval=setInterval(()=>{if(typeof frcaptcha!=='undefined'){clearInterval(interval);resolve();}},FRC_TIMEOUT_INTERVAL);setTimeout(()=>{clearInterval(interval);reject(new Error(`frcaptcha could not be loaded within ${timeout}ms.`));},timeout);});}
10function addCaptchaWidgetIfMissing(captchaDiv){if(!captchaDiv.querySelector(FRC_WIDGET_SELECTOR)){captchaDiv.insertAdjacentHTML('afterbegin',`<div id="${FRC_WIDGET_SELECTOR.substring(1)}" class="frc-captcha"></div><p>&nbsp;</p>`);createCaptchaWidget(captchaDiv);}}
11function createCaptchaWidget(captchaDiv){frcaptcha.createWidget({element:captchaDiv.querySelector(FRC_WIDGET_SELECTOR),sitekey:FRC_SITE_KEY,formFieldName:"frcCaptchaResponse",apiEndpoint:"global",language:"de",theme:captchaThemeDefault,startMode:"auto"});}}
12function resetFriendlyCaptchaWidget(captchaDivId){document.getElementById(captchaDivId)?.querySelector(FRC_WIDGET_SELECTOR)?.frcWidget.reset();}
13function checkCaptchaWidgetCompleted(captchaDivId,callback,...callbackArgs){const widgetState=document.getElementById(captchaDivId)?.querySelector(FRC_WIDGET_SELECTOR)?.frcWidget.state;callbackArgs.push(isNB?'Bitte bestätige, dass du ein Mensch bist (Captcha).':'Bitte bestätigen Sie, dass Sie ein Mensch sind (Captcha).');return widgetState===CAPTCHA_COMPLETED||callback(...callbackArgs);}
14function addFriendlyCaptchaToFormElement(formElement,frcVendorId,captchaDivId,captchaTheme){if(!formElement.dataset.captchaLoaded){formElement.addEventListener('focusin',()=>handleFriendlyCaptcha(frcVendorId,captchaDivId,captchaTheme));formElement.dataset.captchaLoaded="true";}};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.