PageSourceSearch

http://jiawuzhanzheng.org/free_Web/free_Web_FPing.js?i=4

js jiawuzhanzheng.org collected 2026-10-03 02:00:06 UTC 15,988 bytes, 432 lines download raw bytes

1free_Web.Function.Fping = {
2    Config: {
3        tools: [
4            {
5                id: "Br_Fping",
6                fun: "javascript:free_Web.Function.Fping.Start();",
7                title: "开启显示屏",
8                minTitle: "显示屏",
9                entitle: "关闭显示屏",
10                img: "Br_Fping.png",
11                key: "Shift+P",
12                dir: "",
13                keycode: 80
14            },
15            {
16                id: "Br_Fping_opensetting",
17                fun: "javascript:free_Web.Function.Fping.down();",
18                title: "开启显示屏设置",
19                entitle: "关闭显示屏设置",
20                img: "Br_Selectcolor.png",
21                dir: "Br_Fping_opensetting",
22                key: "Shift+O",
23                keycode: 79
24            }
25        ],
26        setting: [
27            {
28                id: "Fpbar_jt",
29                fun: "javascript:free_Web.Function.Fping.FontYs(0);",
30                title: "简体",
31                key: "Shift+I",
32                keycode: 73
33            },
34            {
35                id: "Fpbar_ht",
36                fun: "javascript:free_Web.Function.Fping.FontYs(1);",
37                title: "繁體",
38                key: "Shift+U",
39                keycode: 85
40            },
41            {
42                id: "Fpbar_py",
43                fun: "javascript:free_Web.Function.Fping.FontYs(2);",
44                title: "拼音",
45                key: "Shift+Y",
46                keycode: 89
47            }
48        ],
49        menuBoxid: "Br_Fping_setting",
50        Fpbar: function () {
51            var s = "<div class='browserObj_Fpbar'>";
52            s += "<div  class='Fpbar_r'><ul>";
53            s += "<li><a href='javascript:free_Web.Function.Fping.Start();' title='关闭辅屏浏览'>关闭</a></li>";
54            //s += "<li><a id='Fpbar_En' href='javascript:free_Web.Function.Fping.transEn();' title='在线翻译成英文'>英文<br>翻译</a></li>";
55            s += "</ul></div>";
56            s += "<div  id='Fpbar_l'>";
57            s += '<table width="100%" cellspacing="0" cellpadding="0">';
58            s += '<tbody><tr>';
59            s +=
60                '<td align="center" id="tooltips_show" valign="middle" style="line-height: 130%; font-size: 32px;"></td>';
61            s += '</tr></tbody></table>';
62            s += "</div></div>";
63            return $(s);
64        }
65
66    },
67    toolhtml: function () {
68        s = "<ul>";
69        for (var i = 0; i < this.Config.tools.length; i++) {
70            s += "<li><a id='" +
71                this.Config.tools[i].id +
72                "' href='" +
73                this.Config.tools[i].fun +
74                "' title='" +
75                this.Config.tools[i].title +
76                "(" +
77                this.Config.tools[i].key +
78                ")'><img src='/free_Web/images/" +
79                this.Config.tools[i].img +
80                "' dir='" +
81                this.Config.tools[i].dir +
82                "'></a></li>";
83        }
84        s += "<li class='Br_CName'>显示屏</li></ul>";
85        return $(s);
86    },
87    menutoolhtml: function () {
88        s = "<div id='" + this.Config.menuBoxid + "' ><ul>";
89        for (var i = 0; i < this.Config.setting.length; i++) {
90            if (this.ItemNum == i) {
91                s += "<li class='active'><a id='" +
92                    this.Config.setting[i].id +
93                    "' href='" +
94                    this.Config.setting[i].fun +
95                    "' title='" +
96                    this.Config.setting[i].title +
97                    "(" +
98                    this.Config.setting[i].key +
99                    ")'>" +
100                    this.Config.setting[i].title +
101                    "</a></li>";
102            } else {
103                s += "<li><a id='" +
104                    this.Config.setting[i].id +
105                    "' href='" +
106                    this.Config.setting[i].fun +
107                    "' title='" +
108                    this.Config.setting[i].title +
109                    "(" +
110                    this.Config.setting[i].key +
111                    ")'>" +
112                    this.Config.setting[i].title +
113                    "</a></li>";
114            }
115        }
116        s += "</ul></div>";
117        return $(s);
118    },
119    show: function () {
120        var But = $("#Br_Fping");
121        var Fpbar_En = $("#Fpbar_En");
122        if (this.status) {
123            But.attr("title", "关闭显示屏(" + this.Config.tools[0].key + ")");
124            But.addClass("active");
125        } else {
126            But.attr("title", "开启显示屏(" + this.Config.tools[0].key + ")");
127            But.removeClass("active");
128        };
129
130        if (!this.IStransEn) {
131            Fpbar_En.addClass("en");
132        } else {
133            Fpbar_En.removeClass("en");
134        }
135
136        $("#" + this.Config.menuBoxid).find("li").removeClass("active");
137        $("#" + this.Config.menuBoxid).find("li").eq(this.ItemNum).addClass("active");
138
139    },
140    ISItemsShow: false,
141    ISMenuAdd: false,
142    ISBoxAdd: false,
143    status: false,
144    ItemNum: 0,
145    IStransEn: false,
146    up: function () {
147        $("#" + this.Config.menuBoxid).slideUp(300);
148        this.ISItemsShow = false;
149
150    },
151    clear: function () {
152        this.status = false;
153        $("#browserObj_Fpbar_mian").remove();
154        $("#browserObj_Fpbar_mianShow").remove();
155        $("#Br_Fping_setting").slideUp(300);
156        this.ISItemsShow = false;
157        this.show();
158    },
159    down: function () {
160
161        if (!this.ISItemsShow) {
162            if (!this.ISMenuAdd) {
163                this.menutoolhtml().appendTo(free_Web.tool_Box);
164                this.ISMenuAdd = true;
165
166            }
167            $("#" + this.Config.menuBoxid).css("left", ($("#Br_Fping").offset().left - 2) + "px")
168                .css("top",
169                    ($("#Br_Fping").offset().top - $(document).scrollTop() + $("#Br_Fping").height() + 3) + "px")
170                .slideDown(300);
171            this.ISItemsShow = true;
172            free_Web.Function.audioplay.audio("您已打开显示屏设置开关");
173
174        } else {
175            free_Web.Function.audioplay.audio("您已关闭显示屏设置开关");
176            this.up();
177        }
178        this.show();
179    },
180    FontYs: function (num) {
181        if (this.ItemNum != num) {
182            switch (num) {
183                case 0:
184                    free_Web.Function.audioplay.audio("您显示屏已选择简体模式");
185                    break;
186                case 1:
187                    free_Web.Function.audioplay.audio("您显示屏已选择繁体模式");
188                    break;
189                case 2:
190                    this.IStransEn = false;
191                    free_Web.Function.audioplay.audio("您显示屏已选择拼音模式");
192                    break;
193            }
194            this.ItemNum = num;
195        }
196        $("#Br_Fping_setting").slideUp(300);
197        this.ISItemsShow = false;
198        this.show();
199    },
200    Start: function () {
201        if (free_Web.Function.show.status) {
202            if (!this.status) {
203                if (!free_Web.IsInsideLabel) {
204                    free_Web.Function.InsideLabel.init();
205                }
206                this.status = true;
207                $('<div id="browserObj_Fpbar_mianShow"></div>').css("height", "120px").appendTo(document.body);
208                var box = $('<div id="browserObj_Fpbar_mian"></div>').appendTo(document.body);
209                this.Config.Fpbar().appendTo(box);
210                $("#Fpbar_l").css("width", ($(document.body).width() - 80) + "px");
211                this.registerFPing(
212                    "voice.Shimen-Pointer-Label",
213                    function (ele) {
214                        var str = $(ele).html();
215                        if ($(ele).parent()[0].nodeName == "A") {
216                            str = "链接:" + str;
217                        }
218
219                        return str;
220                    }
221                );
222
223                this.registerFPing(".IMG-Shimen-Pointer-Label", function (ele) {
224                    var str = $(ele).attr("alt");
225                    if (!str) {
226                        str = $(ele).attr("title");
227                    }
228
229                    if (!str) {
230                        str = "";
231                    }
232
233                    str = "图片:" + str;
234                    if ($(ele).parent()[0].nodeName == "A") {
235                        str = "链接 " + str;
236                    }
237                    return str;
238                });
239
240                this.registerFPing(
241                    ".VIDEO-Shimen-Pointer-Label",
242                    function (ele) {
243                        var str = $(ele).attr("title");
244                        if (!str) {
245                            str = "";
246                        }
247                        str = "视频:" + str;
248                        if ($(ele).parent()[0].nodeName == "A") {
249                            str = "链接 " + str;
250                        }
251                        return str;
252                    }
253                );
254
255                this.registerFPing(
256                    ".AUDIO-Shimen-Pointer-Label",
257                    function (ele) {
258                        var str = $(ele).attr("title");
259                        if (!str) {
260                            str = "";
261                        }
262                        str = "音频:" + str;
263                        if ($(ele).parent()[0].nodeName == "A") {
264                            str = "链接 " + str;
265                        }
266                        return str;
267                    }
268                );
269
270                this.registerFPing(
271                    ".INPUT-Shimen-Pointer-Label",
272                    function (ele) {
273                        var str = $(ele).val();
274                        if (!str) {
275                            str = $(ele).attr("placeholder");
276                        }
277
278                        if (!str) {
279                            str = "";
280                        }
281
282                        if ($(ele).attr("type") == "button") {
283                            str = "按钮:" + str;
284                        }
285
286                        if ($(ele).parent()[0].nodeName == "A") {
287                            str = "链接 " + str;
288                        }
289
290                        if ($(ele).attr("type") == "submit" || $(ele).attr("type") == "image") {
291                            str = "提交按钮:" + str;
292                        }
293
294                        if ($(ele).attr("type") == "text") {
295                            str = "输入框:" + str;
296                        }
297
298                        if ($(ele).attr("type") == "checkbox") {
299                            str = "复选框:" + str;
300                        }
301                        if ($(ele).attr("type") == "radio") {
302                            str = "单选按钮:" + str;
303                        }
304                        if ($(ele).attr("type") == "file") {
305                            str = "文件上传:" + str;
306                        }
307
308                        if ($(ele).attr("type") == "password") {
309                            str = "密码输入框:" + str;
310                        }
311                        if ($(ele).attr("type") == "reset") {
312                            str = "重置表单按钮:" + str;
313                        }
314
315                        return str;
316                    }
317                );
318
319                this.registerFPing(
320                    ".SELECT-Shimen-Pointer-Label",
321                    function (ele) {
322                        var str = "选项:" + $(ele).text();
323                        if ($(ele).parent()[0].nodeName == "A") {
324                            str = "链接 " + str;
325                        }
326                        return str;
327                    }
328                );
329                free_Web.Function.audioplay.audio("您已开启显示屏功能");
330                this.show();
331            } else {
332                this.clear();
333                free_Web.Function.audioplay.audio("您已关闭显示屏功能");
334            }
335        }
336    },
337    set: function (strhtml) {
338        if (strhtml.length > 0) {
339            if (strhtml.length < 16) {
340                $("#tooltips_show").css("font-size", "80px");
341            } else if (strhtml.length < 23) {
342                $("#tooltips_show").css("font-size", "60px");
343            } else if (strhtml.length < 35) {
344                $("#tooltips_show").css("font-size", "45px");
345            } else if (strhtml.length < 45) {
346                $("#tooltips_show").css("font-size", "36px");
347            } else {
348                $("#tooltips_show").css("font-size", "30px");
349            }
350            switch (this.ItemNum) {
351                case 0:
352                    this.IStransEn = true;
353                    $("#tooltips_show").html(strhtml);
354                    break;
355                case 1:
356                    this.IStransEn = true;
357                    $("#tooltips_show").html($.simplified2traditional(strhtml));
358                    break;
359                case 2:
360                    $("#tooltips_show").css("font-size", "40px");
361                    $("#tooltips_show").html(this.trans(strhtml));
362                    break;
363            }
364        } else {
365            $("#tooltips_show").html(strhtml);
366        }
367        this.show();
368    },
369    trans: function (cc) {
370        var str = '<div><ul>';
371        var s;
372        for (var i = 0; i < cc.length; i++) {
373            str += '<li>';
374            if (free_Web.pydic.indexOf(cc.charAt(i)) != -1 && cc.charCodeAt(i) > 200) {
375                s = 1;
376                var py = "";
377                while (free_Web.pydic.charAt(free_Web.pydic.indexOf(cc.charAt(i)) + s) != ",") {
378                    py += free_Web.pydic.charAt(free_Web.pydic.indexOf(cc.charAt(i)) + s);
379                    s++;
380                }
381                str += '<span>' + py + '</span>';
382                str += '<span>' + cc.charAt(i) + '</span>';
383            } else {
384                str += '<span></span>';
385                str += '<span>' + cc.charAt(i) + '</span>';
386            }
387            str += '</li>';
388        }
389        str += '</ul></div>';
390
391        return str;
392    },
393    transEn: function () {
394        if (this.ItemNum != 2 && this.IStransEn) {
395            $("#tooltips_show").css("font-size", "36px");
396            var str = $("#tooltips_show").html();
397            if (str.length > 0) {
398
399                $.ajax({
400                    url: '/free_Web/trans.aspx',
401                    type: 'get',
402                    data: { q: encodeURI(str) },
403                    dataType: 'json',
404                    success: function (data) {
405                        if (data.trans_result) {
406                            str = data.trans_result[0].dst;
407                            $("#tooltips_show").html(str);
408
409                        }
410                    }
411                });
412            }
413            this.IStransEn = false;
414            this.show();
415        }
416    },
417    registerFPing: function (tagName, contentFunc) {
418        $(tagName).each(function (index) {
419            $(this).mouseenter(function () {
420                if (free_Web.Function.Fping.status) {
421                    var ele = this;
422                    var str = contentFunc(ele);
423                    free_Web.Function.Fping.set(str);
424                }
425            });
426
427            $(this).mouseout(function () {
428                free_Web.Function.Fping.set("");
429            });
430        });
431    },
432};

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.