<?xml version='1.0' encoding='UTF-8'?><uidget><metadata><name>Advertising</name><description>Get revenue from your website by adding ads on your website</description><help><![CDATA[You need to have a Google Adsense account to add this block on your website.&lt;br&gt; Generate an ad and paste the code to begin earning money. ]]></help><api_version>1.0</api_version><size height='250' width='300' /><server>local://AdsenseCptServer</server><blog en='108' /><deprecated /></metadata><view><content></content><properties><textarea default='""' default_action='true' help='Paste the HTML code generated on your Google Adsense account here.' name='adsense_code' title='Google Adsense Code' /></properties></view><script>UI_Gas_nb_ads_shown={content_targeting:0,search:0,search_result:0,unsupported:0};
UI_List.UI_Gas={initialize:function(a){this.cpt=a
},adLimit:{content_targeting:3,search:2,unsupported:100},onDisplay:function(a){this.cptnode=a||this.cptnode;
this.cptnode.empty();
this.node=$(&quot;&lt;div style=&apos;height:100%&apos;&gt;&lt;/div&gt;&quot;).appendTo(this.cptnode);
this.iframe=this.node.html(&quot;&lt;iframe allowtransparency=&apos;true&apos;&gt;&lt;/iframe&gt;&quot;).find(&quot;iframe&quot;);
this.setSize();
this.ad_built=false
},showAd:function(){if(this.ad_built){return
}var b=this.cpt.statusLoading();
this.ad_built=true;
var a=this;
var d=this.cpt;
var c=function(h,g){var f=g.owner;
var e=&quot;//&quot;+document.location.host;
a.iframe.attr(&quot;src&quot;,e+&quot;/---/&quot;+(d.idserver?a.cpt.idserver:&quot;&quot;)+&quot;?v=&quot;+(v.mode==&quot;viewer&quot;?&quot;1&quot;:&quot;0&quot;)+&quot;&amp;so=&quot;+(f?1:0)+&quot;&amp;w=&quot;+(a.type==&quot;search&quot;?&quot;search_en&quot;:d.W()+&quot;&amp;h=&quot;+d.H())+(v.mode==&quot;viewer&quot;?&quot;&quot;:&quot;&amp;&quot;+Math.random()));
a.iframe.one(&quot;load error abort&quot;,function(){b.update(100)
})
};
if(v.mode==&quot;editor&quot;){c(null,{owner:true})
}else{sigCtl.getVariable(&quot;User.site_owner&quot;,c)
}},onShow:function(){if(UI_Gas_nb_ads_shown[this.type]&lt;this.adLimit[this.type]){UI_Gas_nb_ads_shown[this.type]+=1;
this.ad_shown=true;
this.showAd()
}else{this.ad_shown=false;
if(v.mode==&quot;editor&quot;){var a=this.iframe;
setTimeout(function(){$(&quot;body&quot;,a.contents()).empty().append(&quot;Adsense limits simultaneous ads on a page to 3. You need to remove one or more Adsense blocks.&quot;)
},1000)
}else{this.iframe.remove()
}}},onHide:function(){if(this.ad_shown){UI_Gas_nb_ads_shown[this.type]-=1
}},onDelete:function(){if(this.ad_shown){UI_Gas_nb_ads_shown[this.type]-=1
}},onPropertyChanged:function(){statusController.message(&quot;Save the site to view the ad.&quot;);
this.setSize()
},onResizeStop:function(){this.setSize()
},onSave:function(){if(this.ad_shown){this.onDisplay();
this.showAd()
}},setSize:function(){if(this.cpt.data.adsense_code&amp;&amp;this.cpt.data.adsense_code.match(/cse-search-box/)){this.type=&quot;search&quot;
}else{this.type=&quot;unsupported&quot;
}if(this.cpt.data.adsense_code&amp;&amp;this.type!=&quot;search&quot;){try{this.cpt.setSize({w:parseInt(this.cpt.data.adsense_code.match(/google_ad_width.+?(\d+)\;/)[1]),h:parseInt(this.cpt.data.adsense_code.match(/google_ad_height.+?(\d+)\;/)[1])});
this.type=&quot;content_targeting&quot;
}catch(a){this.type=&quot;unsupported&quot;;
statusController.message(&quot;This Adsense code is incorrect or not supported.&quot;,&quot;error&quot;)
}}if(this.iframe){this.iframe.width(this.cpt.W()).height(this.cpt.H())
}}};</script><style>.UI_Gas iframe{background-color:transparent;border:none}</style></uidget>