Web pages can only be accessed in WeChat's built-in browser

<script type="text/javascript">
    // Regularly match the UserAgent of the browser, and other browsers that do not contain WeChat's unique logo
    var useragent = navigator.userAgent;
    if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
        // This alert box will block the current page from continuing to load
        alert('This visit has been forbidden: you must use WeChat's built-in browser to visit this page!');
        // The following code is forcibly closing the current page with javascript
        var opened = window.open('about:blank', '_self');
        opened.opener = null;
        opened.close();
    }
</script>

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324813987&siteId=291194637