<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>电子发烧友网</title>
    <meta name="keywords" content="电子发烧友 电子电路图,电子技术资料网站">
    <meta name="description" content="电子发烧友网站提供各种电子电路，电路图，原理图,IC资料，技术文章，免费下载等资料，是广大电子工程师所喜爱电子资料网站。">
    <link rel="shortcut icon" href="https://www.elecfans.com/favicon.ico" type="image/x-icon" />
    <style>
        html,
        body,
        div,
        p,
        a,
        span,
        h3,
        button {
            padding: 0px;
            margin: 0px;
        }

        body {
            height: 100vh;
            background: #F2F2F2;
            position: relative;
            font-family: Microsoft YaHei, Microsoft YaHei-Regular;
        }

        img {
            vertical-align: middle;
        }

        .redirectContent {
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -300px;
            margin-top: -200px;
            background: #fff;
            width: 600px;
            background: #ffffff;
            border-radius: 10px;
            padding: 60px 83px;
            text-align: center;
            box-sizing: border-box;
        }

        .redirectContent h3 {
            font-size: 20px;
            font-weight: 700;
            color: #333333;
            margin: 30px 0;
            line-height: 1;
        }

        .redirectUrl {
            margin-top: 10px;
            margin-bottom: 30px;
            padding: 23px 30px 23px 20px;
            background: #f2f2f2;
            font-size: 14px;
            color: #333333;
            font-weight: 400;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
            line-height: 1;
        }

        .btnGroup {
            display: flex;
            text-align: center;
            justify-content: center;
        }
        .btnGroup button {
            width: 120px;
            text-align: center;
            height: 38px;
            line-height: 38px;
            font-size: 14px;
            font-weight: 400;
            border-radius: 4px;
            border: 1px solid #d00000;
            outline: none;
            cursor: pointer;
        }

        .btnGroup .goOn {
            background: #d00000;
            color: #fff;
            margin-right: 10px;
        }

        .btnGroup .goOn:active {
            background: #E36666;
        }

        .btnGroup .closePage {

            background: #fff;
            color: #d00000;
        }

        .redirectContent>img {
            width: 129px;
        }

        .disclaimer {
            font-size: 14px;
            line-height: 1;
            color: #999999;
            line-height: 1;
        }
        @media screen  and (max-width:750px) {
            html{
                font-size: 13.33333vw;
            }
            body{
                background: #fff;
                max-width: 100vw;
                overflow: hidden;
                padding: 0 0.3rem;
                text-align: center;
            }
            .redirectContent{
                position: static;
                margin: 0px;
                padding: 0px;
                padding-top: 2.88rem;
                width: 100%;
            }
            .redirectContent img{
                width: 2.4rem;
            }
            .redirectContent h3{
                font-size: 0.36rem;
                font-weight: bold;
                color:#333333 ;
                margin: 0.3rem 0;
            }
            .disclaimer{
                font-size: 0.28rem;
                color: #999999;
                font-weight: 400;
                line-height: 0.42rem;
                padding:0 0.6rem ;
            }
            .redirectUrl{
                margin-top:0.5rem ;
                padding: 0.46rem 0.3rem;
                font-size: 0.28rem;
                color: #333333;
            }
            .btnGroup button{
                width: 3.3rem;
                height: 0.88rem;
                font-size: 0.28rem;
            }
        }
    </style>
<script src="https://skin.elecfans.com/js/elecfans/mobileAdapt.js"></script></head>
<body>
    <div class="redirectContent">
        <img src="/static/main/img/redirectLogo.png" alt="">
        <h3>您即将跳转进入第三方网站</h3>
        <div class="disclaimer">电子发烧友网不对该网站内容及真实性负责，请您注意信息及财产安全</div>
        <div class="redirectUrl"></div>
        <div class="btnGroup">
            <button class="goOn">继续前往</button>
            <button class="closePage">关闭页面</button>
        </div>
    </div>

</body>

</html>
<script src="https://skin.elecfans.com/js/jquery-min.js"></script>
<script>
    $(function () {
        var searchText = window.location.search.substr(1);
        var searchIndex = searchText.indexOf("redirect=");
        var REDIRECT_URL = unescapeURL(searchText.substring(searchIndex + 9)); // 跳转链接
        if (searchIndex >= 0) {
            if(REDIRECT_URL && REDIRECT_URL.indexOf('https://') !== 0 && REDIRECT_URL.indexOf('http://') !== 0 && REDIRECT_URL.indexOf('//') !== 0) {
              REDIRECT_URL = '//' + REDIRECT_URL;
            }
            $(".goOn").attr("data-href", REDIRECT_URL);
            $(".redirectUrl").text(REDIRECT_URL)
        } else {
            $(".redirectContent h3").text("链接安全性检验中，请稍后...");
            $(".disclaimer").hide();
            $(".goOn").hide();
            $(".redirectUrl").hide()
        }

        // **** 链接转义
        function unescapeURL(url) {
          return url.replace(/&amp;/g, '&');
        }
        
        $(".goOn").click(function () {
            var href = $(this).data("href");
            if (href != '' && href != undefined) {
                window.location.href = href;
            }
        })
        $(".closePage").click(function () {
            if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Chrome") != -1) {
                window.location.href = "about:blank";
                window.close();
            } else {
                window.opener = null;
                window.open("", "_self");
                window.close();
            }
        })
    })
</script>