function uaredirect(f) {
try {
if (document.getElementById }
var b = false ;
if (arguments[1]) {
var e = window if (isSubdomain(arguments[1], e) == 1){
f = f“/#m/”
f = f "/#m/ 🎜> } else {
b = false
}
}
} else {
b = true
}
if (b) {
var c = window.location.hash;
if (!c.match("fromapp")) {
location.replace (f)
}
} this.getdomain = function(f ) {
var e = f.indexOf("://" );
如果(e > 0) {
} else {
var h = f
}
var克 h = h.substr(4)
}
return h
};
if (c == d) {
= this.getdomain(c);
var b = this.getdomain(d);
if (c == b) {
.");
var a = new RegExp("\." c "$");
🎜> } else {
}
}
};
建議站長及web開發人員使用以下壓縮後的js腳本
function uaredirect(f){try{if(document.getElementById("bdmark")!=null){return}var b=false;if(arguments[1]){var e=window.location.主機;var a=window.location.href;if(isSubdomain(arguments[1],e)==1){f=f "/#m/" a;b=true}else{if(isSubdomain(arguments[ 1],e)==2){f=f "/#m/" a;b=true}else{f=a;b=false}}}else{b=true}if(b){var c =window.location.hash;if(!c.match("fromapp")){if((navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i))){location.replace(f )}}}}catch(d){}}函數isSubdomain(c,d){this.getdomain=function(f){var e=f.indexOf("://");if(e>0){ var h=f.substr(e 3)}else{var h=f}var g=/^www./;if(g.test(h)){h=h.substr(4)}回傳h}; if(c==d){return 1}else{var c=this.getdomain(c);var b=this.getdomain(d);if(c==b){return 1}else{c=c.替換(".","\.");var a=new RegExp("\." c "$");if(b.match(a)){return 2}else{return 0}}}};