My goal is NOT dispaly adsense when browser is cordova
So I have these 2 codes:
<script>
var app = document.URL.indexOf( 'http://' ) === -1 && document.URL.indexOf( 'https://' ) === -1;
if ( !app ) {
// DISPLAY adsense here
}
</script>
and adsense block:
<div style="margin-bottom:25px;height:180px;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- responsive-adaptable -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-xxxxx"
data-ad-slot="6768980312"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
I just don't know how to glue them together !