Files
2024-10-29 14:04:59 +08:00

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/');
}