<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">function addFavorite() {
    var url = window.location;
    var title = document.title;
    var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf("360se") &gt; -1) {
        $('.toast-body').html('由于360浏览器功能限制，请按 Ctrl+D 手动收藏！');
        $('.toast').toast('show');
        //alert("由于360浏览器功能限制，请按 Ctrl+D 手动收藏！");
    }
    else if (ua.indexOf("msie 8") &gt; -1) {
        window.external.AddToFavoritesBar(url, title); //IE8
    }
    else if (document.all) {
        try {
            window.external.addFavorite(url, title);
        } catch (e) {

            $('.toast-body').html('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
            $('.toast').toast('show');
            //alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
        }
    }
    else if (window.sidebar) {
        try {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e) {
            $('.toast-body').html('加入收藏失败，请使用Ctrl+D进行添加');
            $('.toast').toast('show');
            //alert("加入收藏失败，请使用Ctrl+D进行添加");
        }
    }
    else {
        $('.toast-body').html('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
        $('.toast').toast('show');
        //alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
    }
}</pre></body></html>