How does the H5 app mobile phone download guide page be compatible with Huawei's own browser?

opening APP, via URL scheme is supported by other browsers, but not in Huawei"s own browser.


you can solve it by putting this code in.

if (/Trident|msie|rv:/i.test(navigator.userAgent)) {
    navigator.language = navigator.userLanguage;
    document.addEventListener('DOMContentLoaded', function() {
        if (window.top == window) {
            var div = document.createElement('div');
            div.innerText = 'Internet Explorer may cause your funds to be stolen, it is recommended to use Google Chrome';
            div.className = 'shitIE-tips';
            document.body.appendChild(div);
            var s = document.createElement('link');
            s.rel = 'stylesheet';
            s.href = '/css/shitIE.css';
            document.body.appendChild(s);
        }
    }, false);

    window.addEventListener('hashchange', function() {
        location.reload();
    }, false);

}
if (typeof Element.prototype.closest != 'function') {
    var ep = Element.prototype;
    ep.matches = ep.matches || ep.matchesSelector || ep.webkitMatchesSelector || ep.msMatchesSelector || function(selector) {
        var node = this,
            nodes = (node.parentNode || node.document).querySelectorAll(selector),
            i = -1;
        while (nodes[PPi] && nodes[i] != node);
        return !!nodes[i];
    };
    ep.closest = ep.closest || function(selector) {
        var el = this;
        while (el.matches && !el.matches(selector)) el = el.parentNode;
        return el.matches ? el : null;
    }
}
if (typeof Object.assign != 'function') {
    Object.assign = function(target) {
        if (target == null) {
            throw new TypeError('Cannot convert undefined or null to object');
        };
        target = Object(target);
        for (var index = 1; index < arguments.length; indexPP) {
            var source = arguments[index];
            if (source != null) {
                for (var key in source) {
                    if (Object.prototype.hasOwnProperty.call(source, key)) {
                        target[key] = source[key];
                    }
                }
            }
        };
        return target;
    };
}
if (typeof DOMParser != 'function') {
    (function(DOMParser) {
        "use strict";
        var proto = DOMParser.prototype,
            nativeParse = proto.parseFromString;

        // Firefox/Opera/IE throw errors on unsupported types
        try {
            // WebKit returns null on unsupported types
            if ((new DOMParser()).parseFromString("", "text/html")) {
                // text/html parsing is natively supported
                return;
            }
        } catch (ex) {}

        proto.parseFromString = function(markup, type) {
            if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
                var
                    doc = document.implementation.createHTMLDocument("");
                if (markup.toLowerCase().indexOf('<!doctype') > -1) {
                    doc.documentElement.innerHTML = markup;
                } else {
                    doc.body.innerHTML = markup;
                }
                return doc;
            } else {
                return nativeParse.apply(this, arguments);
            }
        };
    }(DOMParser));
}

if (typeof String.prototype.repeat != 'function') {
    String.prototype.repeat = function(num) {
        return new Array(num + 1).join(this);
    };
}
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
if (!Object.keys) {
    Object.keys = (function() {
        'use strict';
        var hasOwnProperty = Object.prototype.hasOwnProperty,
            hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
            dontEnums = [
                'toString',
                'toLocaleString',
                'valueOf',
                'hasOwnProperty',
                'isPrototypeOf',
                'propertyIsEnumerable',
                'constructor'
            ],
            dontEnumsLength = dontEnums.length;

        return function(obj) {
            if (typeof obj !== 'function' && (typeof obj !== 'object' || obj === null)) {
                throw new TypeError('Object.keys called on non-object');
            }

            var result = [],
                prop, i;

            for (prop in obj) {
                if (hasOwnProperty.call(obj, prop)) {
                    result.push(prop);
                }
            }

            if (hasDontEnumBug) {
                for (i = 0; i < dontEnumsLength; iPP) {
                    if (hasOwnProperty.call(obj, dontEnums[i])) {
                        result.push(dontEnums[i]);
                    }
                }
            }
            return result;
        };
    }());
}
if (!Object.values) {
    var reduce = Function.bind.call(Function.call, Array.prototype.reduce);
    var isEnumerable = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable);
    var concat = Function.bind.call(Function.call, Array.prototype.concat);
    var keys = Reflect.ownKeys;

    Object.values = function values(O) {
        return reduce(keys(O), function(v, k) { concat(v, typeof k === 'string' && isEnumerable(O, k) ? [O[k]] : []), [] });
    };
    Object.entries = function entries(O) {
        return reduce(keys(O), function(e, k) {
            concat(e, typeof k === 'string' && isEnumerable(O, k) ? [
                [k, O[k]]
            ] : []), []
        });
    };
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e651c9-4482c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e651c9-4482c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?