PageSourceSearch

http://csstoday.net/images/pc_mobile.js

js csstoday.net collected 2026-10-02 07:35:46 UTC 1,292 bytes, 40 lines download raw bytes

1var isPC = IsPC();//获取是否为PC端
2function IsPC() {//获取设备是否为PC的方法
3    var userAgentInfo = navigator.userAgent;
4    var Agents = ["Android", "iPhone",
5        "SymbianOS", "Windows Phone",
6        "iPad", "iPod"];
7    var flag = true;
8    for (var v = 0; v < Agents.length; v++) {
9        if (userAgentInfo.indexOf(Agents[v]) >= 0) {
10            flag = false;
11            break;
12        }
13    }
14    return flag;
15};
16
17function dynamicLoadCss(url) {//加载css方法
18    var head = document.getElementsByTagName('head')[0];
19    var link = document.createElement('link');
20    link.type = 'text/css';
21    link.rel = 'stylesheet';
22    link.href = url;
23    head.appendChild(link);
24}
25
26function dynamicLoadJs(url, callback) {//加载js方法
27    var head = document.getElementsByTagName('head')[0];
28    var script = document.createElement('script');
29    script.type = 'text/javascript';
30    script.src = url;
31    if (typeof(callback) == 'function') {
32        script.onload = script.onreadystatechange = function () {
33            if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
34                callback();
35                script.onload = script.onreadystatechange = null;
36            }
37        };
38    }
39    head.appendChild(script);
40}

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.