!function(){function e(e){var o=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1).match(o);return null!=n?decodeURI(n[2]):null}if("undefined"!=typeof process){require("nw.gui").Window.get().maximize();var o=require("fs"),n=require("path"),l=require("qyutil"),i=n.join(process.cwd(),"log"),c=n.join(i,"client_log.txt");l.ensureDir(i);global.log=function(){o.appendFileSync(c,l.getLogLine(arguments)+"\n")};console.log=global.log;console.info=console.log;console.error=console.log;"true"==e("clear")&&localStorage.clear();var r,t=process.platform;"win32"==t?r="taskkill /im qynwnode.exe":"linux"==t&&(r="pkill qynwnode");var s=require("child_process");process.on("exit",function(){"win32"==t?s.execSync(r):s.exec(r);console.log("closing client")});process.on("uncaughtException",function(e){console.log("Caught exception: "+e)})}}();