锘縡ree_Web.Function.Fping = { Config: { tools: [ { id: "Br_Fping", fun: "javascript:free_Web.Function.Fping.Start();", title: "寮€鍚樉绀哄睆", minTitle: "鏄剧ず灞?, entitle: "鍏抽棴鏄剧ず灞?, img: "Br_Fping.png", key: "Shift+P", dir: "", keycode: 80 }, { id: "Br_Fping_opensetting", fun: "javascript:free_Web.Function.Fping.down();", title: "寮€鍚樉绀哄睆璁剧疆", entitle: "鍏抽棴鏄剧ず灞忚缃?, img: "Br_Selectcolor.png", dir: "Br_Fping_opensetting", key: "Shift+O", keycode: 79 } ], setting: [ { id: "Fpbar_jt", fun: "javascript:free_Web.Function.Fping.FontYs(0);", title: "绠€浣?, key: "Shift+I", keycode: 73 }, { id: "Fpbar_ht", fun: "javascript:free_Web.Function.Fping.FontYs(1);", title: "绻侀珨", key: "Shift+U", keycode: 85 }, { id: "Fpbar_py", fun: "javascript:free_Web.Function.Fping.FontYs(2);", title: "鎷奸煶", key: "Shift+Y", keycode: 89 } ], menuBoxid: "Br_Fping_setting", Fpbar: function () { var s = "
"; s += "
"; return $(s); } }, toolhtml: function () { s = ""; return $(s); }, menutoolhtml: function () { s = "
').css("height", "120px").appendTo(document.body); var box = $('
').appendTo(document.body); this.Config.Fpbar().appendTo(box); $("#Fpbar_l").css("width", ($(document.body).width() - 80) + "px"); this.registerFPing( "voice.Shimen-Pointer-Label", function (ele) { var str = $(ele).html(); if ($(ele).parent()[0].nodeName == "A") { str = "閾炬帴锛? + str; } return str; } ); this.registerFPing(".IMG-Shimen-Pointer-Label", function (ele) { var str = $(ele).attr("alt"); if (!str) { str = $(ele).attr("title"); } if (!str) { str = ""; } str = "鍥剧墖锛? + str; if ($(ele).parent()[0].nodeName == "A") { str = "閾炬帴 " + str; } return str; }); this.registerFPing( ".VIDEO-Shimen-Pointer-Label", function (ele) { var str = $(ele).attr("title"); if (!str) { str = ""; } str = "瑙嗛锛? + str; if ($(ele).parent()[0].nodeName == "A") { str = "閾炬帴 " + str; } return str; } ); this.registerFPing( ".AUDIO-Shimen-Pointer-Label", function (ele) { var str = $(ele).attr("title"); if (!str) { str = ""; } str = "闊抽锛? + str; if ($(ele).parent()[0].nodeName == "A") { str = "閾炬帴 " + str; } return str; } ); this.registerFPing( ".INPUT-Shimen-Pointer-Label", function (ele) { var str = $(ele).val(); if (!str) { str = $(ele).attr("placeholder"); } if (!str) { str = ""; } if ($(ele).attr("type") == "button") { str = "鎸夐挳锛? + str; } if ($(ele).parent()[0].nodeName == "A") { str = "閾炬帴 " + str; } if ($(ele).attr("type") == "submit" || $(ele).attr("type") == "image") { str = "鎻愪氦鎸夐挳锛? + str; } if ($(ele).attr("type") == "text") { str = "杈撳叆妗嗭細" + str; } if ($(ele).attr("type") == "checkbox") { str = "澶嶉€夋锛? + str; } if ($(ele).attr("type") == "radio") { str = "鍗曢€夋寜閽細" + str; } if ($(ele).attr("type") == "file") { str = "鏂囦欢涓婁紶锛? + str; } if ($(ele).attr("type") == "password") { str = "瀵嗙爜杈撳叆妗嗭細" + str; } if ($(ele).attr("type") == "reset") { str = "閲嶇疆琛ㄥ崟鎸夐挳锛? + str; } return str; } ); this.registerFPing( ".SELECT-Shimen-Pointer-Label", function (ele) { var str = "閫夐」锛? + $(ele).text(); if ($(ele).parent()[0].nodeName == "A") { str = "閾炬帴 " + str; } return str; } ); free_Web.Function.audioplay.audio("鎮ㄥ凡寮€鍚樉绀哄睆鍔熻兘"); this.show(); } else { this.clear(); free_Web.Function.audioplay.audio("鎮ㄥ凡鍏抽棴鏄剧ず灞忓姛鑳?); } } }, set: function (strhtml) { if (strhtml.length > 0) { if (strhtml.length < 16) { $("#tooltips_show").css("font-size", "80px"); } else if (strhtml.length < 23) { $("#tooltips_show").css("font-size", "60px"); } else if (strhtml.length < 35) { $("#tooltips_show").css("font-size", "45px"); } else if (strhtml.length < 45) { $("#tooltips_show").css("font-size", "36px"); } else { $("#tooltips_show").css("font-size", "30px"); } switch (this.ItemNum) { case 0: this.IStransEn = true; $("#tooltips_show").html(strhtml); break; case 1: this.IStransEn = true; $("#tooltips_show").html($.simplified2traditional(strhtml)); break; case 2: $("#tooltips_show").css("font-size", "40px"); $("#tooltips_show").html(this.trans(strhtml)); break; } } else { $("#tooltips_show").html(strhtml); } this.show(); }, trans: function (cc) { var str = '
'; return str; }, transEn: function () { if (this.ItemNum != 2 && this.IStransEn) { $("#tooltips_show").css("font-size", "36px"); var str = $("#tooltips_show").html(); if (str.length > 0) { $.ajax({ url: '/free_Web/trans.aspx', type: 'get', data: { q: encodeURI(str) }, dataType: 'json', success: function (data) { if (data.trans_result) { str = data.trans_result[0].dst; $("#tooltips_show").html(str); } } }); } this.IStransEn = false; this.show(); } }, registerFPing(tagName, contentFunc) { $(tagName).each(function (index) { $(this).mouseenter(function () { if (free_Web.Function.Fping.status) { var ele = this; var str = contentFunc(ele); free_Web.Function.Fping.set(str); } }); $(this).mouseout(function () { free_Web.Function.Fping.set(""); }); }); }, };