12 lines
398 B
JavaScript
Executable File
12 lines
398 B
JavaScript
Executable File
var _pattern = "android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos"
|
|
var _regex = new RegExp(_pattern, "ig");
|
|
var _UA = navigator.userAgent;
|
|
|
|
var domainUrl = window.location.href;
|
|
var pathUrl = window.location.pathname;
|
|
|
|
if(_regex.test(_UA) && pathUrl.search("/us/") != -1){
|
|
|
|
location.href=domainUrl.replace('/us/', '/usmobile/');
|
|
}
|