Introduced
function Uaredirect (f) {try {if (document.getElementById ("Bdmark")! = NULL) {Return}var b = false;if (arguments[1]) {var e = Window.location.host;var A = window.location.href;if (IsSubdomain (A Rguments[1], e) = = 1) {f = f + "/#m/" + A;b = true} else {if (Issubdomain (arguments[1], e) = = 2) {f = f + "/#m/" + a;b = t Rue} 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)) {Location.replace (f)}}}} catch (d) {}}function 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)} return 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.replace (".", "\ \."); var a = new RegExp ("\ \" + C + "$"), if (B.match (a)) {return 2} else {return 0}}}};
Page usage
<script src= "~/js/uaredirect.js" ></script><script >uaredirect ("url to jump") </script>
"JS" To determine the device type, access to the appropriate website