var testcase_items=[],active=!1,empty=!0,tab_id=null;console.log("init");
chrome.runtime.onMessage.addListener(function(a,c,b){console.log(a);"append"==a.action&&(testcase_items[testcase_items.length]=a.obj,empty=!1,b({}));"poke"==a.action&&(testcase_items[testcase_items.length-1]=a.obj,b({}));"get_status"==a.action&&b({active:active,empty:empty});"start"!=a.action||active||(empty=active=!0,testcase_items=[],tab_id=a.recorded_tab,chrome.tabs.update(tab_id,{url:a.start_url},function(c){alert("\n\u25b9   \u70b9\u51fb\u201c\u786e\u5b9a\u201d\u6309\u94ae\u5f00\u59cb\u5f55\u5236\u9875\u9762\u64cd\u4f5c\u6307\u4ee4\n\u25b9   \u53f3\u952e\u70b9\u51fb\u9875\u9762\u6dfb\u52a0\u5176\u5b83\u64cd\u4f5c\u6307\u4ee4\n");chrome.tabs.sendMessage(tab_id,
{action:"open",url:a.start_url});b({start:!0})}));"stop"==a.action&&(active=!1,chrome.tabs.sendMessage(tab_id,{action:"stop"}),b({}));"get_items"==a.action&&b({items:testcase_items})});
