PageSourceSearch

https://nhltoseattle.com/wp-content/mu-host-plugins/wpcloud-bot-protection/assets/bootstrap.js?ver=1789579025

js nhltoseattle.com collected 2026-09-25 07:41:24 UTC 3,474 bytes, 141 lines download raw bytes

1(function () {
2	var cfg = window.__wpcloudBlackbox || {};
3	if ( ! cfg.apiKey ) {
4		return;
5	}
6
7	var isLog = cfg.mode === 'log';
8
9	var form  = ( cfg.form && document.getElementById( cfg.form ) ) ||
10		document.getElementById( 'loginform' ) ||
11		document.getElementById( 'lostpasswordform' );
12	var field = document.getElementById( cfg.field );
13	if ( ! form || ! field ) {
14		return;
15	}
16
17	var challengeInProgress = false;
18
19	var attempts = 0;
20	( function whenReady() {
21		if ( ! window.Blackbox || typeof window.Blackbox.configure !== 'function' ) {
22			if ( attempts++ < 50 ) {
23				window.setTimeout( whenReady, 100 );
24			} else if ( window.console && window.console.warn ) {
25				window.console.warn( '[wpcloud-blackbox] client did not load; gate inactive.' );
26			}
27			return;
28		}
29
30		try {
31			window.Blackbox.configure( {
32				apiKey: cfg.apiKey,
33				challengeContainer: isLog ? null : document.getElementById( 'wpcloud-blackbox-challenge' ),
34				onSuccess: function ( result ) {
35					if ( result && result.sessionId ) {
36						field.value = result.sessionId;
37					}
38				},
39				onSessionExpired: function () {
40					try {
41						window.Blackbox.getSessionId();
42					} catch ( err ) {
43					}
44				},
45				onChallengeStart: function () {
46					challengeInProgress = true;
47				},
48				onChallengeComplete: function () {
49					challengeInProgress = false;
50				},
51				onChallengeFailure: function () {
52					challengeInProgress = false;
53				}
54			} );
55			window.Blackbox.init();
56		} catch ( err ) {
57		}
58	} )();
59
60	if ( ! isLog ) {
61		var submitting = false;
62		var passingThrough = false;
63
64		var submitButton = form.querySelector( 'input[type="submit"], button[type="submit"]' );
65
66		var setSubmitDisabled = function ( disabled ) {
67			if ( submitButton ) {
68				submitButton.disabled = disabled;
69			}
70		};
71
72		var sessionUsable = function () {
73			if ( ! window.Blackbox || typeof window.Blackbox.isSessionExpired !== 'function' ) {
74				return false;
75			}
76			try {
77				return ! window.Blackbox.isSessionExpired();
78			} catch ( err ) {
79				return false;
80			}
81		};
82
83		form.addEventListener( 'submit', function ( e ) {
84			if ( passingThrough ) {
85				return;
86			}
87			if ( submitting ) {
88				e.preventDefault();
89				return;
90			}
91			if ( challengeInProgress ) {
92				e.preventDefault();
93				return;
94			}
95			if ( field.value && sessionUsable() ) {
96				submitting = true;
97				setSubmitDisabled( true );
98				window.setTimeout( function () {
99					if ( e.defaultPrevented ) {
100						submitting = false;
101						setSubmitDisabled( false );
102					}
103				}, 0 );
104				return;
105			}
106			if ( ! window.Blackbox || typeof window.Blackbox.getSessionId !== 'function' ) {
107				return;
108			}
109			e.preventDefault();
110			submitting = true;
111			setSubmitDisabled( true );
112
113			var redispatched = false;
114			var submit = function () {
115				if ( redispatched ) { return; }
116				redispatched = true;
117
118				window.setTimeout( function () {
119					passingThrough = true;
120					if ( typeof form.requestSubmit === 'function' ) {
121						form.requestSubmit();
122					} else {
123						form.submit();
124					}
125					passingThrough = false;
126				}, 0 );
127
128				window.setTimeout( function () {
129					submitting = false;
130					setSubmitDisabled( false );
131				}, 10000 );
132			};
133
134			var safety = window.setTimeout( submit, 3000 );
135			window.Blackbox.getSessionId()
136				.then( function ( sid ) { if ( typeof sid === 'string' && sid ) { field.value = sid; } } )
137				.catch( function () {} )
138				.then( function () { window.clearTimeout( safety ); submit(); } );
139		} );
140	}
141})();

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.