PageSourceSearch

https://16pic.com/js/jq-common.js?v=250321

js 16pic.com collected 2026-09-29 10:49:22 UTC 14,467 bytes, 335 lines download raw bytes

1!function($) {
2    $.extend({
3        emptyFn: function() {},
4        iframeLayer: function(href, width, height, title, config) {
5            config = config || {},
6                config = "string" == typeof config ? eval("(" + config + ")") : config,
7                width = width || "100%",
8                height = height || "100%",
9                config["content"] = [href, "no"],
10                config["title"] = title || "",
11                config["type"] = 2,
12                config["area"] = [width, height],
13                layer.open(config)
14        },
15        contentLayer: function(href, width, height, title, config) {
16            var content = "";
17            return $.ajax({
18                type: "get",
19                url: href,
20                // headers: {
21                //     token: $.cookieGet("ooo_auth"),
22                //     uvtoken: $.cookieGet("OOOPICUSERTOKEN")
23                // },
24                dataType: "xml",
25                data: {
26                    isAjax: 1
27                },
28                cache: !1,
29                async: !1,
30                success: function(a) {
31                    content = $(a).find("response").text()
32                }
33            }),
34                $.isEmpty(content) ? !1 : (config = config || {},
35                    config = "string" == typeof config ? eval("(" + config + ")") : config,
36                    width = width || "100%",
37                    height = height || "100%",
38                    config["content"] = content,
39                    config["title"] = title || "",
40                    config["type"] = 1,
41                    config["area"] = [width, height],
42                    layer.open(config),
43                    void 0)
44        },
45        alertLayer: function(attr, content, config, successd, callback) {
46            config = config || {},
47                content = content || "",
48                successd = successd || "$.emptyFn",
49                callback = callback || "$.emptyFn",
50                callback = eval(callback),
51                successd = eval(successd),
52                callback(attr),
53                layer.alert(content, config, successd)
54        },
55        confirmLayer: function(attr, content, config, successd, failed, callback) {
56            config = config || {},
57                content = content || "",
58                successd = successd || "$.emptyFn",
59                failed = failed || "$.emptyFn",
60                callback = callback || "$.emptyFn",
61                callback = eval(callback),
62                successd = eval(successd),
63                failed = eval(failed),
64                callback(attr),
65                layer.confirm(content, config, successd, failed)
66        },
67        ajaxLayer: function(attr, href, callback, data) {
68            href = href || "",
69                callback = callback || "$.emptyFn",
70                data = data || [],
71                callback = eval(callback),
72                data = "string" == typeof data ? eval("(" + data + ")") : data,
73                $.ajax({
74                    url: href,
75                    dataType: "jsonp",
76                    data: data,
77                    cache: !1,
78                    success: function(a) {
79                        callback(attr, a)
80                    }
81                })
82        },
83        ajaxPostLayer: function(attr, href, callback, data) {
84            href = href || "",
85                callback = callback || "$.emptyFn",
86                data = data || [],
87                callback = eval(callback),
88                data = "string" == typeof data ? eval("(" + data + ")") : data,
89                $.ajax({
90                    url: href,
91                    type: "POST",
92                    dataType: "json",
93                    headers: {
94                        token: $.cookieGet("ooo_auth"),
95                        uvtoken: $.cookieGet("OOOPICUSERTOKEN")
96                    },
97                    data: data,
98                    cache: !1,
99                    success: function(a) {
100                        callback(attr, a)
101                    }
102                })
103        },
104        ajaxContentLayer: function(attr, href, callback) {
105            href = href || "",
106                $.ajax({
107                    url: href,
108                    dataType: "xml",
109                    headers: {
110                        token: $.cookieGet("ooo_auth"),
111                        uvtoken: $.cookieGet("OOOPICUSERTOKEN")
112                    },
113                    data: {
114                        isAjax: 1
115                    },
116                    cache: !1,
117                    success: function(ResponseText) {
118                        if ("undefined" == typeof callback) {
119                            var content = $(ResponseText).find("root").text();
120                            $(attr).append(content)
121                        } else
122                            callback = callback || "$.emptyFn",
123                                callback = eval(callback),
124                                callback(attr, ResponseText)
125                    }
126                })
127        },
128        cookieSet: function(a, b, c, d, e) {
129            var f = new Date
130                , g = c
131                , h = a + "=" + b;
132            d = d || "16pic.com",
133                f.setTime(f.getTime() + 1e3 * g),
134                h += ";expires=" + f,
135                h = d ? h + ";domain=" + d : h,
136                h = e ? h + ";path=" + e : h,
137                document.cookie = h
138        },
139        cookieGet: function(a) {
140            var d, e, f, b = document.cookie.replace(/[ ]/g, ""), c = b.split(";");
141            for (e = 0; e < c.length; e++)
142                if (f = c[e].split("="),
143                a == f[0]) {
144                    d = f[1];
145                    break
146                }
147            return d
148        },
149        cookieDelete: function(a) {
150            var b = new Date;
151            b.setTime(b.getTime() - 1e4),
152                document.cookie = a + "=v; domain=16pic.com; expires =" + b.toGMTString()
153        },
154        Base64: function() {
155            var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
156            this.encode = function(b) {
157                var d, e, f, g, h, i, j, c = "", k = 0;
158                for (b = _utf8_encode(b); k < b.length; )
159                    d = b.charCodeAt(k++),
160                        e = b.charCodeAt(k++),
161                        f = b.charCodeAt(k++),
162                        g = d >> 2,
163                        h = (3 & d) << 4 | e >> 4,
164                        i = (15 & e) << 2 | f >> 6,
165                        j = 63 & f,
166                        isNaN(e) ? i = j = 64 : isNaN(f) && (j = 64),
167                        c = c + a.charAt(g) + a.charAt(h) + a.charAt(i) + a.charAt(j);
168                return c
169            }
170                ,
171                this.decode = function(b) {
172                    var d, e, f, g, h, i, j, c = "", k = 0;
173                    for (b = b.replace(/[^A-Za-z0-9\+\/\=]/g, ""); k < b.length; )
174                        g = a.indexOf(b.charAt(k++)),
175                            h = a.indexOf(b.charAt(k++)),
176                            i = a.indexOf(b.charAt(k++)),
177                            j = a.indexOf(b.charAt(k++)),
178                            d = g << 2 | h >> 4,
179                            e = (15 & h) << 4 | i >> 2,
180                            f = (3 & i) << 6 | j,
181                            c += String.fromCharCode(d),
182                        64 != i && (c += String.fromCharCode(e)),
183                        64 != j && (c += String.fromCharCode(f));
184                    return c = _utf8_decode(c)
185                }
186                ,
187                _utf8_encode = function(a) {
188                    var b, c, d;
189                    for (a = a.replace(/\r\n/g, "\n"),
190                             b = "",
191                             c = 0; c < a.length; c++)
192                        d = a.charCodeAt(c),
193                            128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(192 | d >> 6),
194                                b += String.fromCharCode(128 | 63 & d)) : (b += String.fromCharCode(224 | d >> 12),
195                                b += String.fromCharCode(128 | 63 & d >> 6),
196                                b += String.fromCharCode(128 | 63 & d));
197                    return b
198                }
199                ,
200                _utf8_decode = function(a) {
201                    for (var b = "", c = 0, d = c1 = c2 = 0; c < a.length; )
202                        d = a.charCodeAt(c),
203                            128 > d ? (b += String.fromCharCode(d),
204                                c++) : d > 191 && 224 > d ? (c2 = a.charCodeAt(c + 1),
205                                b += String.fromCharCode((31 & d) << 6 | 63 & c2),
206                                c += 2) : (c2 = a.charCodeAt(c + 1),
207                                c3 = a.charCodeAt(c + 2),
208                                b += String.fromCharCode((15 & d) << 12 | (63 & c2) << 6 | 63 & c3),
209                                c += 3);
210                    return b
211                }
212        },
213        isEmpty: function(a) {
214            return "" == a || "undefined" == a || "undefined" == typeof a || 0 == a || "0" == a ? !0 : !1
215        },
216        getNetWork: function() {
217            var a;
218            if (this.isEmpty(navigator.connection))
219                return "unknown";
220            switch (navigator.connection.effectiveType) {
221                case "wifi":
222                    a = "wifi";
223                    break;
224                case "4g":
225                    a = "4G";
226                    break;
227                case "2g":
228                    a = "2G";
229                    break;
230                case "3g":
231                    a = "3G";
232                    break;
233                case "ethernet":
234                    a = "ethernet";
235                    break;
236                case "default":
237                    a = "unknown"
238            }
239            return a
240        },
241        parse_url: function(a) {
242            var b = document.createElement("a");
243            return b.href = a,
244                {
245                    source: a,
246                    protocol: b.protocol.replace(":", ""),
247                    host: b.hostname,
248                    port: b.port,
249                    query: b.search,
250                    params: function() {
251                        for (var f, a = {}, c = b.search.replace(/^\?/, "").split("&"), d = c.length, e = 0; d > e; e++)
252                            c[e] && (f = c[e].split("="),
253                                a[f[0]] = f[1]);
254                        return a
255                    }(),
256                    file: (b.pathname.match(/\/([^\/?#]+)$/i) || [, ""])[1],
257                    hash: b.hash.replace("#", ""),
258                    path: b.pathname.replace(/^([^\/])/, "/$1"),
259                    relative: (b.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ""])[1],
260                    segments: b.pathname.replace(/^\//, "").split("/")
261                }
262        },
263        search_keyword: function(a) {
264            var c, b = "";
265            return -1 !== a.indexOf("baidu.com") ? (c = a.match(/baidu.+wo?r?d=([^\\&]*)/i),
266                b = c && c[1] ? decodeURI(c[1]) : "") : -1 !== a.indexOf("google.com") || -1 !== a.indexOf("google.cn") ? (c = a.match(/google.+q=([^\\&]*)/i),
267                b = c && c[1] ? decodeURI(c[1]) : "") : -1 !== a.indexOf("so.com") ? (c = a.match(/so.+q=([^\\&]*)/i),
268                b = c && c[1] ? decodeURI(c[1]) : "") : -1 !== a.indexOf("sogou.com") ? (c = a.match(/sogou.com.+query=([^\\&]*)/i),
269                b = c && c[1] ? decodeURI(c[1]) : "") : -1 !== a.indexOf("soso.com") && (b = c && c[1] ? decodeURI(c[1]) : ""),
270                b
271        },
272    }),
273        $(".iframe_layer").on("click", function(a) {
274            var b, c, d, e, f;
275            a.stopPropagation(),
276                b = $(this).data("iu"),
277                c = $(this).data("iw"),
278                d = $(this).data("ih"),
279                e = $(this).data("it"),
280                f = $(this).data("ic"),
281                $.iframeLayer(b, c, d, e, f)
282        }),
283        $(".content_layer").on("click", function(a) {
284            var b, c, d, e, f;
285            a.stopPropagation(),
286                b = $(this).data("iu"),
287                c = $(this).data("iw"),
288                d = $(this).data("ih"),
289                e = $(this).data("it"),
290                f = $(this).data("ic"),
291                $.contentLayer(b, c, d, e, f)
292        }),
293        $(".confirm_layer").on("click", function(a) {
294            var b, c, d, e, f;
295            a.stopPropagation(),
296                b = $(this).data("ict"),
297                c = $(this).data("ic"),
298                d = $(this).data("isd"),
299                e = $(this).data("ifd"),
300                f = $(this).data("isc"),
301                $.confirmLayer(this, b, c, d, e, f)
302        }),
303        $(".alert_layer").on("click", function(a) {
304            var b, c, d, e;
305            a.stopPropagation(),
306                b = $(this).data("ict"),
307                c = $(this).data("ic"),
308                d = $(this).data("isd"),
309                e = $(this).data("isc"),
310                $.alertLayer(this, b, c, d, e)
311        }),
312        $(".ajax_click_layer").on("click", function(a) {
313            var b, c, d;
314            a.stopPropagation(),
315                b = $(this).data("iu"),
316                c = $(this).data("isc"),
317                d = $(this).data("ipd"),
318                $.ajaxLayer(this, b, c, d)
319        }),
320        $(".ajax_mouseover_layer").on("mouseover", function(a) {
321            var b, c, d;
322            a.stopPropagation(),
323                b = $(this).data("iu"),
324                c = $(this).data("isc"),
325                d = $(this).data("ipd"),
326                $.ajaxLayer(this, b, c, d)
327        }),
328        $(".ajax_content_layer").on("click", function(a) {
329            var b, c;
330            a.stopPropagation(),
331                b = $(this).data("iu"),
332                c = $(this).data("isc"),
333                $.ajaxContentLayer(this, b, c)
334        })
335}(jQuery);

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.