PageSourceSearch

https://www.7-11.com.tw/Company/esg/js/lib/checkDevice.js

js 7-11.com.tw collected 2026-09-24 08:58:00 UTC 2,000 bytes, 48 lines download raw bytes

1//裝置判斷
2var userDevice = 'P';
3function checkDevice() {
4    var mobiles = new Array
5    (
6        // 不包含ipad
7        "midp", "j2me", "avant", "docomo", "novarra", "palmos", "palmsource",
8        "240x320", "opwv", "chtml", "pda", "windows ce", "mmp/",
9        "blackberry", "mib/", "symbian", "wireless", "nokia", "hand", 
10        "phone", "cdm", "up.b", "audio", "sie-", "sec-", "samsung", "htc",
11        "mot-", "mitsu", "sagem", "sony", "alcatel", "lg", "eric", "vx",
12        "NEC", "philips", "mmm", "xx", "panasonic", "sharp", "wap", "sch",
13        "rover", "pocket", "benq", "java", "pt", "pg", "vox", "amoi",
14        "bird", "compal", "kg", "voda", "sany", "kdd", "dbt", "sendo",
15        "sgh", "gradi", "jb", "dddi", "moto", "iphone", "android",
16        "incognito", "webmate", "dream", "cupcake", "webos",
17        "s8000", "bada", "googlebot-mobile", "linux"
18
19
20        // 含ipad
21        /*
22        "midp", "j2me", "avant", "docomo", "novarra", "palmos", "palmsource",
23        "240x320", "opwv", "chtml", "pda", "windows ce", "mmp/",
24        "blackberry", "mib/", "symbian", "wireless", "nokia", "hand", "mobi",
25        "phone", "cdm", "up.b", "audio", "sie-", "sec-", "samsung", "htc",
26        "mot-", "mitsu", "sagem", "sony", "alcatel", "lg", "eric", "vx",
27        "NEC", "philips", "mmm", "xx", "panasonic", "sharp", "wap", "sch",
28        "rover", "pocket", "benq", "java", "pt", "pg", "vox", "amoi",
29        "bird", "compal", "kg", "voda", "sany", "kdd", "dbt", "sendo",
30        "sgh", "gradi", "jb", "dddi", "moto", "iphone", "android",
31        "ipod", "incognito", "webmate", "dream", "cupcake", "webos",
32        "s8000", "bada", "googlebot-mobile", "ipad", "linux"
33        */
34    )
35
36    var userAgent = navigator.userAgent;
37
38    for (var i = 0; i < mobiles.length; i++) {
39        if (userAgent.toLowerCase().indexOf(mobiles[i]) > 0) {
40            userDevice = 'M';
41            break;
42        }
43    }
44
45  
46}
47
48checkDevice();

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.