init
This commit is contained in:
12
public/frontend/weben/scripts/common.js
Executable file
12
public/frontend/weben/scripts/common.js
Executable file
@@ -0,0 +1,12 @@
|
||||
|
||||
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/');
|
||||
}
|
||||
Reference in New Issue
Block a user