PageSourceSearch

https://meilbn.com/js/config.js

js meilbn.com collected 2026-10-02 16:02:46 UTC 1,704 bytes, 66 lines download raw bytes

vendor: 1,704 bytes, lines 1-66
1if (!window.NexT) window.NexT = {};
2
3(function() {
4  const className = 'next-config';
5
6  const staticConfig = {};
7  let variableConfig = {};
8
9  const parse = text => JSON.parse(text || '{}');
10
11  const update = name => {
12    const targetEle = document.querySelector(`.${className}[data-name="${name}"]`);
13    if (!targetEle) return;
14    const parsedConfig = parse(targetEle.text);
15    if (name === 'main') {
16      Object.assign(staticConfig, parsedConfig);
17    } else {
18      variableConfig[name] = parsedConfig;
19    }
20  };
21
22  update('main');
23
24  window.CONFIG = new Proxy({}, {
25    get(overrideConfig, name) {
26      let existing;
27      if (name in staticConfig) {
28        existing = staticConfig[name];
29      } else {
30        if (!(name in variableConfig)) update(name);
31        existing = variableConfig[name];
32      }
33
34      // For unset override and mixable existing
35      if (!(name in overrideConfig) && typeof existing === 'object') {
36        // Get ready to mix.
37        overrideConfig[name] = {};
38      }
39
40      if (name in overrideConfig) {
41        const override = overrideConfig[name];
42
43        // When mixable
44        if (typeof override === 'object' && typeof existing === 'object') {
45          // Mix, proxy changes to the override.
46          return new Proxy({ ...existing, ...override }, {
47            set(target, prop, value) {
48              target[prop] = value;
49              override[prop] = value;
50              return true;
51            }
52          });
53        }
54
55        return override;
56      }
57
58      // Only when not mixable and override hasn't been set.
59      return existing;
60    }
61  });
62
63  document.addEventListener('pjax:success', () => {
64    variableConfig = {};
65  });
66})();

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.