域名随机跳转-腾讯判定

<!DOCTYPE html>

<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, user-scalable=yes, minimum-scale=1, maximum-scale=1.0">
    <meta name="format-detection" content="telephone=no">
    <title></title>
    <style type="text/css">
        .tips-txt {
            display: none;
            text-align: center;
            font-size: 18px;
            color: #333;
        }

        .width-100 {
            display: block;
            max-width: 100%;
            height: auto;
            margin: auto;
        }
    </style>
</head>

<body>
<div class="tips-txt" id="tipsTxt">
    <img src="https://www.15920760983.cn/jumpout.png" class="width-100">
</div>

<script type="text/javascript">
    var urlList = ['https://www.test1.com', 'https://www.test2.com', 'https://www.test3.com',
        'https://www.test4.com', 'https://www.test5.com'];
    var urlTest = urlList[Math.floor(Math.random() * urlList.length)];
    var u = navigator.userAgent;
    var isWechat = (u.match(/MicroMessenger/i));
    // var isQQ = (u.match(/QQ/i));

    var qqBrowser = false, qqWebview = false;

    var browser = navigator.userAgent.toLowerCase();
    if (browser.indexOf('qbwebviewtype') != -1 && browser.indexOf('mqqbrowser') == -1) {
        //qq内置浏览器
        qqWebview = true;
    } else if (browser.indexOf('qbwebviewtype') != -1 && browser.indexOf("mqqbrowser") != -1) {
        //qq浏览器
        qqBrowser = true;
    }

    if (isWechat) {
        var styleElement = document.getElementById('tipsTxt');
        styleElement.setAttribute('style', 'display: block');
    }// QQ内置浏览器
    else if (qqWebview == true && qqBrowser != true) {
        var styleElement = document.getElementById('tipsTxt');
        styleElement.setAttribute('style', 'display: block');
    }
    // QQ浏览器
    else if (qqBrowser == true && qqWebview != true) {
        window.location.href = urlTest;
    } else {
        window.location.href = urlTest;
    }
</script>

</body>

</html>

发表回复