text: var IFCObj=function(){var a={statusChange:null,ySandboxFrame:null,findSandboxFrame:function(){frames&&frames.ifc_frame?(_dumpy(1,1,"MAIN: looking for bridge from 'ifc_frame'"),a.ySandboxFrame=frames.ifc_frame.contentWindow||frames.ifc_frame.contentDocument||frames.ifc_frame):(_dumpy(1,1,"MAIN: looking for bridge from 'ifc_frame'"),a.ySandboxFrame=$frameByName("ifc_frame").contentWindow||$frameByName("ifc_frame").contentDocument||$frameByName("ifc_frame"),"undefined"==typeof a.ySandboxFrame&&opener&&
  opener.ifc_frame&&(_dumpy(1,1,"MAIN: looking for bridge from 'opener'"),a.ySandboxFrame=opener.ifc_frame.contentWindow||opener.ifc_frame.contentDocument||frames.ifc_frame));return a},ifcMsgCounter:0,ifcMsgQueue:[],receiveMessage:function(b){_dumpy(1,1,"MAIN: receiveMessage() from "+b.origin);if("object"==typeof b&&void 0!==b.data.s&&void 0!==b.data.a){var c=b.data.s+"."+b.data.a;_dumpy(1,1,"MAIN: {0} ({1})".format(c,b.origin));switch(c){case "yeapf.offline":case "yeapf.online":"function"==typeof a.statusChange&&
  a.statusChange(b.data.a);break;case "yeapf.getConnParams":_dumpy(1,1,"MAIN: getConnParams");a.getConnParams(function(a){b.source.postMessage({s:"yeapf",a:"connParams",limits:{connParams:a}},"*")});break;case "yeapf.dataPleaded":if(c=a.ifcMsgQueue[b.data.callbackId]){if("function"==typeof c.aCallbackFunction)c.aCallbackFunction(200,0,b.data.data);else if("string"==typeof c.aCallbackFunction){var d=c.aCallbackFunction.split("."),e=null,e=1==d.length?window[c.aCallbackFunction]:window[d[0]][d[1]];"function"==
  typeof e&&e(b.data.data)}delete a.ifcMsgQueue[b.data.callbackId]}}}},getConnParams:function(b){chrome&&chrome.storage&&chrome.storage.local.get("connParams",function(a){a=a.connParams;b(a)})},setConnParams:function(b,c,d,e){var f={server:b,user:c,password:d,terminalID:e};chrome.storage.local.set({connParams:f},function(){a.ySandboxFrame.postMessage({s:"yeapf",a:"connParams",limits:{connParams:f}},"*")})},plead:function(b,c,d,e){_dumpy(1,1,"MAIN: preparing to plead ("+b+","+c+")");if("function"==typeof e||
  "undefined"==typeof e||"string"==typeof e)if("undefined"===typeof a.ySandboxFrame&&(_dump("MAIN: looking for 'ifc_frame' iframe"),a.findSandboxFrame()),a.ySandboxFrame){var f=a.ifcMsgCounter++;d={s:"yeapf",a:"plead",context:{s:b,a:c,limits:d,queueId:f}};a.ifcMsgQueue[f]={aCallbackFunction:e};_dumpy(1,1,"MAIN: pleading("+b+","+c+")");_dumpy(1,1,JSON.stringify(d));a.ySandboxFrame.postMessage(d,"*")}else _dumpy(1,1,"MAIN: you need a sandboxed iframe called ifc_frame");else _dumpy(1,1,"MAIN: you need to define a callback function")}};
  return a.findSandboxFrame()},ifc;addOnLoadManager(function(){ifc||(ifc=IFCObj());window.addEventListener("message",ifc.receiveMessage,!1)});
  