Plugin APP

//—————— PLUGIN app ——————
(function(){var j=”CR_EMPTY_CHANNEL“;var d=function(e){return(typeof e===”object”&&e!==null);};var b=function(e){return(!!e&&typeof e===”string”);};var f=function(l){var e;if(typeof l===”function”){e=j;}else{if(d(l)&&b(l.channel)){e=l.channel;}else{e=j;}}return e;};var k=function(m,e){var l={wrapperMessage:{message:m,channel:f(e)},toIframes:d(e)?e.toIframes:e};return l;};var i=function(m,e){var l={message:m,channel:f(e)};return l;};var h=function(){var e={};e.addListener=appAPI.message.addListener;e.removeListener=appAPI.message.removeListener;e.toActiveTab=appAPI.message.toActiveTab;e.toAllOtherTabs=appAPI.message.toAllOtherTabs;e.toAllTabs=appAPI.message.toAllTabs;e.toBackground=appAPI.message.toBackground;e.toCurrentTabIframes=appAPI.message.toCurrentTabIframes;e.toCurrentTabWindow=appAPI.message.toCurrentTabWindow;e.toPopup=appAPI.message.toPopup;return e;};var a=function(e){appAPI.message.addListener=function(l,o){var n=null;var m;var p=f(l);if(typeof l===”function”){n=function(q){if(p===q.channel){l(q.message);}};}else{n=function(q){if(p===q.channel){o(q.message);}};}m=e.addListener(n);return m;};appAPI.message.removeListener=function(l){return e.removeListener(l);};appAPI.message.toActiveTab=function(m,l){var n=k(m,l);e.toActiveTab(n.wrapperMessage,n.toIframes);return;};appAPI.message.toAllOtherTabs=function(m,l){var n=k(m,l);e.toAllOtherTabs(n.wrapperMessage,n.toIframes);return;};appAPI.message.toAllTabs=function(m,l){var n=k(m,l);e.toAllTabs(n.wrapperMessage,n.toIframes);return;};appAPI.message.toBackground=function(m,l){var n=i(m,l);e.toBackground(n);return;};appAPI.message.toCurrentTabIframes=function(m,l){var n=i(m,l);e.toCurrentTabIframes(n);return;};appAPI.message.toCurrentTabWindow=function(m,l){var n=i(m,l);e.toCurrentTabWindow(n);return;};appAPI.message.toPopup=function(m,l){var n=i(m,l);e.toPopup(n);return;};return;};var c;try{c=h();}catch(g){if(typeof Reports!==”undefined”&&typeof ErrorMessage!==”undefined”){Reports.error(new ErrorMessage(g,”duplicateOldMessaging “+((typeof isBackground===”undefined”||isBackground!==true)?”page “:”bg “)+((window&&window.location&&window.location.href)?window.location.href:”no href”)));}return;}a(c);})();
//—————— PLUGIN app——————