收集的网易判断页面浏览器类型的脚本,以备日后的不时之需:
<script type="text/javascript">
(function(){
var ua = navigator.userAgent.toLowerCase(),
iphone = (ua.match(/iphone/i) == "iphone"),
android = (ua.match(/android/i) == "android"),
loc = window.location;
if(loc.search.indexOf("s=noRedirect") == -1 && (iphone || android)){
loc.href = "http://play.163.com/m/";
}
})();
document.domain = "163.com"
</script>
脚本来源:http://play.163.com/