modified: pixi.toml
[GalaxyCodeBases.git] / etc / Chrome / 12306_ticket_helper_iccfish / src / pages / scripts / about.js
blob3c2bdefa6fe80c5c601786c2807435b8f65066ca
1 $(function(){var n,t=function(){var t=$("#regInfo").removeClass().addClass("label label-normal");n.type==="NRML"||n.type==="PART"?t.addClass("label-success"):n.type==="GROP"?t.addClass("label-info"):n.type==="DONT"&&t.addClass("label-primary");t.html("注册给:"+n.name+","+n.typeDesc)};message.sendAction("getSnInfo",null,function(i){n=i;n&&n.result===0||(n={result:0,type:"NRML",typeDesc:"正式版",name:"行将回家的游子们"});t()});message.sendAction("getVersionInfo",null,function(n){$("#versionInfo").html("v"+n.curVersion);n.updateInfo&&n.updateInfo.version&&n.updateInfo.hasUpdate?$("#updatesFound").show().find("strong").html(n.updateInfo.version).end().find("a").attr("href",n.updateInfo.url||"http://www.fishlee.net/soft/44/download.html"):$("#updatesFound").hide()});$("#btnReg").click(function(){var i=$.trim($("#txtsn").val());if(!i){alert("请输入密钥哦");return}message.sendAction("setSnInfo",i,function(i){i&&i.result===0?(n=i,t(),$("#reg").modal("hide"),alert("注册成功!\n\n注册给:"+i.name+"\n版 本:"+i.typeDesc)):alert(i&&i.msg||"未知错误")})})});$(function(){var n=function(){$("input[data-sysconfigkey], select[data-sysconfigkey]").each(function(){var t=this,i=$(this),r=t.type,u=t.dataset.sysconfigkey,f=sysConfig,n=f[u];typeof n=="boolean"?r=="radio"?$("input[name="+t.name+"][value="+(n?1:0)+"]")[0].checked=!0:r=="checkbox"?t.checked=n:i.val(n?"1":"0"):i.val(n)})};$(document).on("sysConfigUpdated",function(){n()});sysConfig&&n();$("#chkEnableAutoCaptcha").change(function(){message.sendAction("setUserConfig",{enableAutoCaptcha:this.checked})})})