var iftrue = 0
hrefValue = window.location.href.toLowerCase(); //获取当前页面的地址
alertUrls = ['focipharm.com.cn', 'foci-pharm.com', 'fczy.cn', 'fczy.com'];
//指定你想要alert的域名,多个可以在数组中直接追加即可
//追加如:['www.bbb.com', 'bbb.com', 'abc.bbb.com']
for(key in alertUrls){
if(String(hrefValue).indexOf(alertUrls[key]) >= 0){
iftrue = 1
break; //直接跳出循环
}
}
if (iftrue === 0) {
console.log("请勿以非法方式使用本公司广告代码!");
} else {
}
document.write("");
document.writeln("");
function detectDeviceType() {
var ua = navigator.userAgent;
if (ua.match(/(iphone|Android|midp-2|opera mini|ucweb|windows ce|symbianos|blackberry|nokia|palm|cellphone)/i)) {
$('.fullbox8').hide();
$('.smallbox8').hide();
$('.zhongbutanchu').hide();
console.log('Android');
} else {
console.log('pc');
}
}
window.addEventListener('load', function () {
detectDeviceType();
});