PageSourceSearch

https://baoxinwen.github.io/js/third-party/quicklink.js

js baoxinwen.github.io collected 2026-10-03 08:41:38 UTC 944 bytes, 37 lines download raw bytes

vendor: 944 bytes, lines 1-37
1/* global CONFIG, quicklink */
2
3(function() {
4  if (typeof CONFIG.quicklink.ignores === 'string') {
5    const ignoresStr = `[${CONFIG.quicklink.ignores}]`;
6    CONFIG.quicklink.ignores = JSON.parse(ignoresStr);
7  }
8
9  let resetFn = null;
10
11  const onRefresh = () => {
12    if (resetFn) resetFn();
13    if (!CONFIG.quicklink.enable) return;
14
15    let ignoresArr = CONFIG.quicklink.ignores || [];
16    if (!Array.isArray(ignoresArr)) {
17      ignoresArr = [ignoresArr];
18    }
19
20    resetFn = quicklink.listen({
21      timeout : CONFIG.quicklink.timeout,
22      priority: CONFIG.quicklink.priority,
23      ignores : [
24        uri => uri.includes('#'),
25        uri => uri === CONFIG.quicklink.url,
26        ...ignoresArr
27      ]
28    });
29  };
30
31  if (CONFIG.quicklink.delay) {
32    window.addEventListener('load', onRefresh);
33    document.addEventListener('pjax:success', onRefresh);
34  } else {
35    document.addEventListener('page:loaded', onRefresh);
36  }
37})();

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.