PageSourceSearch

https://www.awcycles.co.uk/js/recaptcha.js

js awcycles.co.uk collected 2026-10-08 06:18:39 UTC 1,528 bytes, 55 lines download raw bytes

1window.AdvRecaptchaSiteKey = window.AdvRecaptchaSiteKey || (function () {
2    var el = document.querySelector('script[data-recaptcha-sitekey]');
3
4    return el ? el.getAttribute('data-recaptcha-sitekey') : '';
5})();
6window.AdvRecaptchaLoaded = false;
7
8window.AdvRecaptchaWhenReady = function (callback) {
9    if (!window.AdvRecaptchaSiteKey) {
10        callback(false);
11        return;
12    }
13
14    if (window.AdvRecaptchaLoaded) {
15        callback(true);
16        return;
17    }
18
19    var attempts = 0;
20
21    var timer = setInterval(function () {
22        if (typeof grecaptcha !== 'undefined' && typeof grecaptcha.ready === 'function' && typeof grecaptcha.execute === 'function') {
23            clearInterval(timer);
24
25            grecaptcha.ready(function () {
26                window.AdvRecaptchaLoaded = true;
27                callback(true);
28            });
29        }
30        else if (++attempts > 100) {
31            clearInterval(timer);
32            callback(false);
33        }
34    }, 100);
35};
36
37window.AdvRecaptchaToken = function (action, callback) {
38    window.AdvRecaptchaWhenReady(function (ready) {
39        if (!ready) {
40            callback('');
41            return;
42        }
43
44        try {
45            grecaptcha.execute(window.AdvRecaptchaSiteKey, { 'action': action })
46                .then(function (token) { callback(token || ''); })
47                .catch(function () { callback(''); });
48        }
49        catch (e) {
50            callback('');
51        }
52    });
53};
54
55window.AdvRecaptchaToken('page_view', function () { });

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.