我在我的网站中使用了popads popunder,但我有一个问题。这种情况发生在移动设备上,流行音乐一直在浏览器中打开,用户无法访问其他页面。所以我认为如果我将代码隐藏在移动设备上,使其只出现在桌面上,就可以解决问题。有人能帮助我吗?
非常感谢,请按照上面的代码:
PopAds.net Popunder Code
<script type="text/javascript">
var _pop = _pop || [];
_pop.push(['siteId', ###]);
_pop.push(['minBid', 0]);
_pop.push(['popundersPerIP', 0]);
_pop.push(['delayBetween', 0]);
_pop.push(['default', false]);
_pop.push(['defaultPerDay', 0]);
_pop.push(['topmostLayer', false]);
(function() {
var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true;
var s = document.getElementsByTagName('script')[0];
pa.src = '//c1.popads.net/pop.js';
pa.onerror = function() {
var sa = document.createElement('script'); sa.type = 'text/javascript'; sa.async = true;
sa.src = '//c2.popads.net/pop.js';
s.parentNode.insertBefore(sa, s);
};
s.parentNode.insertBefore(pa, s);
})();
</script>
答案 0 :(得分:1)
试试这个!它对我有用!这将仅在桌面上显示广告
<b:if cond='data:blog.isMobileRequest == "true"'>
(leave this empty)
<b:else/>
(put your popads code here)
</b:if>