function Browserredirect () {var suseragent = navigator.userAgent.toLowerCase (); var bisipad = Suseragent.match (/ipad/i) = = "ipad"; var Bisiphoneos = Suseragent.match (/iphone os/i) = = "iphone OS"; var BISMIDP = Suseragent.match (/midp/i) = = "MIDP"; var bIsUc7 = Suseragent.match (/rv:1.2.3.4/i) = = "rv:1.2.3.4"; var bisuc = Suseragent.match (/ucweb/i) = = "UCWeb"; var bisandroid = Suseragent.match (/android/i) = = "Android"; var bisce = Suseragent.match (/windows ce/i) = = "Windows CE"; var biswm = Suseragent.match (/windows mobile/i) = = "Windows Mobile"; if (! ( Bisipad | | Bisiphoneos | | BISMIDP | | BIsUc7 | | Bisuc | | bisandroid | | Bisce | | BISWM) {//pc-link = document.createelement (' link '); Link.setattribute (' rel ', ' stylesheet ');//Link.setattribute (' href ', ' uc.css '); Document.head.appendChild (link); $ (' #mob_content '). CSS (' Display ', ' none '); }else{//Mobile var link = document.createelement (' link '), Link.setattribute (' rel ', ' stylesheet '); Link.setattribute (' href ', '/styles/safe/css/mobile.css '); DOcument.head.appendChild (link); var owidth = $ (' #asideTool '). Innerwidth ();//Owidth = parseint (owidth); $ (' #asideTool '). CSS (' right ',-owidth); $ (' #asideTool '). CSS (' Display ', ' none '); }}$ (function () {var html = document.documentelement; var hwidth = Html.getboundingclientrect (). width;//Console.log ( Hwidth); html.style.fontSize = Hwidth/15 + "px"; Browserredirect (); });
Determine the mobile or PC side