init
This commit is contained in:
14
public/frontend/m_weben/js/common.js
Executable file
14
public/frontend/m_weben/js/common.js
Executable file
@@ -0,0 +1,14 @@
|
||||
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){
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
location.href=domainUrl.replace('/usmobile/', '/us/');
|
||||
}
|
||||
Reference in New Issue
Block a user