PageSourceSearch

https://kava.tv/resources/views/LWtdYCVTbOmTSk9djbUJYVAOC82faEft/g…/override-check-website.js?v=v_1790232359

js kava.tv collected 2026-09-24 12:03:17 UTC 1,688 bytes, 48 lines download raw bytes

1(function(){
2  function wrap(fn){
3    return async function(...args){
4      const $ = window.jQuery;
5      if ($ && $.fn && typeof $.fn.css === 'function') {
6        const old = $.fn.css;
7        // ignore only attempts to hide the body via display:none
8        $.fn.css = function(prop, val){
9          try {
10            if (this && this[0] === document.body && prop === 'display' && val === 'none') {
11              return this; // skip hiding
12            }
13          } catch(e){}
14          return old.apply(this, arguments);
15        };
16        try {
17          return await fn.apply(this, args);
18        } finally {
19          $.fn.css = old; // restore
20          // safety: ensure body visible
21          try { if (document.body && getComputedStyle(document.body).display === 'none') document.body.style.display = 'block'; } catch(e){}
22        }
23      } else {
24        const res = await fn.apply(this, args);
25        try { if (document.body && getComputedStyle(document.body).display === 'none') document.body.style.display = 'block'; } catch(e){}
26        return res;
27      }
28    };
29  }
30
31  // immediate wrap if present
32  if (typeof window.checkWebsiteConfiguration === 'function') {
33    window.checkWebsiteConfiguration = wrap(window.checkWebsiteConfiguration);
34    return;
35  }
36
37  // intercept future assignment
38  let stored;
39  Object.defineProperty(window, 'checkWebsiteConfiguration', {
40    configurable: true,
41    enumerable: true,
42    get(){ return stored; },
43    set(fn){
44      stored = (typeof fn === 'function') ? wrap(fn) : fn;
45      Object.defineProperty(window,'checkWebsiteConfiguration', { value: stored, writable:true, configurable:true, enumerable:true });
46    }
47  });
48})();

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.