PageSourceSearch

https://www.speedpdf.com/js/channel.js

js speedpdf.com collected 2026-10-03 19:55:36 UTC 961 bytes, 28 lines download raw bytes

1// 把Referer写入到Cookie
2// 获取 Referer
3const referer = document.referrer;
4
5let now;
6let expireTime;
7// 如果Referer不为空,并且不是来自自身站点,就将其写入Cookie
8if (referer !== "" && referer.indexOf(location.hostname) === -1) {
9    now = new Date();
10    expireTime = now.getTime() + 5 * 60 * 1000; // 5分钟后过期
11    now.setTime(expireTime);
12    document.cookie = "referer=" + encodeURIComponent(referer) + "; expires=" + now.toUTCString() + "; path=/;";
13}
14
15// 把渠道号写入到Cookie
16// 获取URL参数
17const urlParams = new URLSearchParams(window.location.search);
18
19// 获取ch参数的值
20const chValue = urlParams.get('ch');
21
22// 将ch参数写入Cookie,有效期为5分钟
23if (chValue) {
24    now = new Date();
25    expireTime = now.getTime() + 5 * 60 * 1000; // 5分钟后过期
26    now.setTime(expireTime);
27    document.cookie = "ch=" + encodeURIComponent(chValue) + "; expires=" + now.toUTCString() + "; path=/;";
28}

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.