Chrome插件--》油猴的使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yenange/article/details/84668625

以前介绍过几款插件, 不过都只能弄一下样式, 屏蔽广告而已, 没有能自己写脚本的。 这不, 油猴就提供了这个功能。

下载地址:http://chromecj.com/Handler/Download/1468

同样, 油猴插件现在也是没有办法直接安装到 Chrome 的了,

需要先安装插件伴侣:http://crxhelp.bj.bcebos.com/crxhelp.zip

有了插件伴侣, 安装很简单就不赘述了。

先做一个效果:

  1.  屏蔽 csdn 回贴框 定焦/失焦 高度变化(这个比较烦人) 的特效 :
  2.  防止 csdn 管理子菜单点击后收缩。
// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://bbs.csdn.net/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    // 1. 屏蔽 csdn 回贴框特效
    $("#post_body").before('<textarea class="required quoteOnly markItUpEditor" cols="40" id="post_body_tmp" maxlength="10000" rows="20" style="height: 300px;"></textarea>');
    var $txt = $("#post_body").hide();
    var $tmp = $("#post_body_tmp");
    $tmp.on("keyup",function(){
        $txt.val($tmp.val());
    });
    setInterval(function(){
        if($txt.val().length>$tmp.val().length+6){
            $tmp.val($txt.val());
        }
    },2000);
    // 2. 防止点击 管理子菜单后,菜单收缩。 注意替换 yenange 为自己的用户名
    var urlCurr = window.location.href;
    var urlArr =[
        "https://bbs.csdn.net/user/open_topics",
        "https://bbs.csdn.net/users/yenange/topics",
        "https://bbs.csdn.net/user/pointed_topics",
        "https://bbs.csdn.net/user/replied_topics",
        "https://bbs.csdn.net/user/attention_topics",
        "https://bbs.csdn.net/user/attention_tags",
        "https://bbs.csdn.net/user/point_transfer"];

    if($.inArray( urlCurr, urlArr )!=-1){
        $("#menu_302_a").trigger("click");
    }
})();

是不是很简单?

虽然没有直接屏蔽那个 foucs/blur 事件,但在页面上看来,已经没有动态效果了, 而且最终也能正常回贴。

下面先贴出 csdn 的相关脚本(https://csdnimg.cn/release/bbs/dist/js/apps/bbsMin-d7e7277d5f.js),

有空慢慢看吧:

如果哪位大侠知道 如何移除 document 上的 click 事件, 或 屏蔽 左侧菜单点击“我回复的贴子” 之后的收缩事件,

欢迎告之, 非常感谢!


回贴框相关: 

var CSDN = {};
function throttle(o, a, n) {
    var i, s = new Date;
    return function() {
        var t = arguments
          , e = new Date;
        clearTimeout(i),
        n <= e - s ? (o.apply(this, t),
        s = e) : i = setTimeout(o, a)
    }
}
function keyupFn() {
    if (window.localStorage) {
        var t = $(".mod_topic_wrap:first").data("topicId");
        window.localStorage.setItem(t, JSON.stringify($(".mod_topic_wrap #post_body").val()))
    }
}
function SetStorage(t, e) {
    window.localStorage && localStorage.setItem(t, e)
}
function editStorage(t) {
    var e = $("#bbsModal input[name='reason_type']")
      , o = $("#bbsModal #reason")
      , a = $("#bbsModal #post_body")
      , n = $("#topic_title")
      , i = $("#bbsModal #topic_body")
      , s = {}
      , l = {};
    if (e.change(function() {
        s.reasonCategory = $(this).val(),
        l[t] = s,
        SetStorage(t, JSON.stringify(s))
    }),
    o.keyup(function() {
        s.reason = $(this).val(),
        l[t] = s,
        SetStorage(t, JSON.stringify(s))
    }),
    a.keyup(function() {
        s.editContent = $(this).val(),
        l[t] = s,
        SetStorage(t, JSON.stringify(s))
    }),
    n.keyup(function() {
        s.topicTitle = $(this).val(),
        l[t] = s,
        SetStorage(t, JSON.stringify(s))
    }),
    i.keyup(function() {
        s.editTopicContent = $(this).val(),
        l[t] = s,
        SetStorage(t, JSON.stringify(s))
    }),
    window.localStorage && localStorage.getItem(t)) {
        var c = JSON.parse(localStorage.getItem(t));
        c.reasonCategory && ($("#bbsModal input[value=" + c.reasonCategory + "]")[0].checked = !0,
        s.reasonCategory = c.reasonCategory),
        c.reason && (o.val(c.reason),
        s.reason = c.reason),
        c.editContent && (a.val(c.editContent),
        s.editContent = c.editContent),
        c.topicTitle && (n.val(c.topicTitle),
        s.topicTitle = c.topicTitle),
        c.editTopicContent && (i.val(c.editTopicContent),
        s.editTopicContent = c.editTopicContent)
    }
}
function showDialog(o, a) {
    ajaxFn(o, a, function(t) {
        if ($("#bbsModalLabel").html(a),
        $("#bbsModal .modal-body").html(t),
        "edit" == o) {
            var e = $(".bbs_detail_wrap .mod_topic_wrap:first");
            editStorage("bbs_edit_reply_" + e.data("topicId") + "_" + e.data("postId")),
            checkRemainChars("#bbsModal #topic_title", "#bbsModal #title_count_notice"),
            checkRemainChars("#bbsModal #topic_body", "#bbsModal #topic_body_count_notice")
        }
        $("#bbsModal").modal({
            show: "true"
        })
    })
}
function ajaxFn(t, e, o) {
    void 0 !== CFG.TOPIC_ID && $.ajax({
        type: "get",
        url: CFG.API_URL + "topics/" + CFG.TOPIC_ID + "/" + t,
        dataType: "html",
        success: function(t) {
            "" == t && "undefined" == t || o(t)
        },
        error: function(t) {
            console.log(t)
        }
    })
}
function comAjaxFn(t, e, o, a, n) {
    if (t.preventDefault(),
    t.stopPropagation(),
    CSDN.getUserName()) {
        var i = $(e).closest(".post");
        if (i.hasClass("topic"))
            if ("举报" == a)
                var s = i.data("postId")
                  , l = CFG.API_URL + "posts/" + s + o;
            else
                s = i.data("topicId"),
                l = CFG.API_URL + "topics/" + s + o;
        else
            s = i.data("postId"),
            l = CFG.API_URL + "posts/" + s + o;
        $.ajax({
            type: "get",
            url: l,
            dataType: "html",
            success: function(t) {
                "" == t && "undefined" == t || ($("#bbsModalLabel").html(a),
                $("#bbsModal .modal-body").html(t),
                "function" == typeof n && n(),
                $("#bbsModal").modal({
                    show: "true"
                }))
            },
            error: function(t) {
                console.log(t)
            }
        })
    } else
        $("#bbsModal").modal({
            show: "true"
        }),
        $("#bbsModalLabel").html("未登录"),
        $("#bbsModal .modal-body").html('请<a href="https://passport.csdn.net/">登录</a>')
}
function allCheck(t, e) {
    for (var o = document.getElementsByName(t), a = 0; a < o.length; a++)
        "checkbox" == o[a].type && (o[a].checked = e)
}
function checkRemainChars(t, e) {
    if ($(t).length) {
        var o = $(t).attr("maxLength")
          , a = $(t).val().length;
        a < o ? $(e).html("你还可以输入" + (o - a) + "个字符") : $(e).html("你还可以输入0个字符")
    }
}
function geniusAjax(t, n) {
    $.ajax({
        type: "get",
        url: t,
        dataType: "json",
        success: function(t) {
            if ("" != t || "undefined" != t) {
                for (var e = t.list, o = "", a = 0; a < e.length; a++)
                    o += '<dl class="genius_list"><dt><a href="' + e[a].profile_url + '" target="_blank"><img src="' + e[a].avatar_url + '"></a></dt><dd><a href="' + e[a].profile_url + '"  rel="nofollow"  target="_blank" class="user_nick_name" title="' + e[a].show_name + '">' + e[a].show_name + '</a><p class="genius_p"><b>&nbsp;</b><span><img title="专家分:' + e[a].total_tech_point + '" src="' + e[a].point_level_url + '" ></span></p><a href="javascript:;" class="genius_att" data-username="' + e[a].username + '">关注</a></dd></dl>';
                $(n).html(o),
                CSDN.checkFollow(n)
            }
        },
        error: function(t) {
            console.log(t)
        }
    })
}
function doubleH(t, e, o) {
    var a = $(t.target);
    a.is(e) || a.is(".edit_btn_wrap span") || $(e).animate({
        height: o
    }, 300),
    t.stopPropagation()
}
$.extend(CSDN, {
    getUserName: function() {
        var t = document.cookie.match(new RegExp("(^| )UserName=([^;]*)(;|$)"));
        return t ? t[2] : ""
    },
    activeAttLink: function(t) {
        this.checkFollow(t),
        $(t).on("click", "a.genius_att", function(t) {
            t.preventDefault();
            var e = $(this);
            if (!e.hasClass("followed")) {
                var o = e.data("username");
                $.ajax({
                    type: "POST",
                    url: "//my.csdn.net/index.php/follow/do_follow",
                    data: {
                        username: o
                    },
                    dataType: "json",
                    success: function(t) {
                        1 == t.succ ? (alert("关注成功!"),
                        e.addClass("followed").text("已关注")) : alert(t.msg)
                    }
                })
            }
        })
    },
    checkFollow: function(t) {
        var e = CSDN.getUserName().toLowerCase()
          , o = $(t);
        if ("" !== e) {
            var a = o.find("a.genius_att").map(function(t, e) {
                return encodeURIComponent($(e).data("username"))
            }).get().join()
              , n = "//my.csdn.net/index.php/follow/check_is_followed_m/" + encodeURIComponent(e) + "/" + a + "?jsonpcallback=?";
            $.getJSON(n, {}, function(t) {
                $.each(t, function(t, e) {
                    1 == e && o.find("a.genius_att[data-username=" + t + "]").addClass("followed").text("已关注")
                })
            }),
            o.find("a.att[data-username=" + e + "]").addClass("followed").text("自己")
        }
    }
}),
$(function() {
    $("select.jumpMenu").change(function() {
        var t = $(this).val();
        window.location.href = 1 != t ? window.location.pathname + "?page=" + t : window.location.pathname
    }),
    0 < $("table.table_list").length && $("table.table_list tr:even").addClass("zebra"),
    "undefined" != typeof CNick && new CNick(".name2nick").showNickname()
}),
$(function() {
    var t, e, o, a = {
        tab: function() {
            var e = $(".bbs_tab em")
              , o = $(".honour_c ul");
            e.hover(function() {
                $(this).addClass("cur_tab").siblings().removeClass("cur_tab");
                var t = e.index(this);
                o.eq(t).addClass("cur_block").siblings().removeClass("cur_block")
            })
        },
        leftMenu: function() {
            if (0 < $(".csdn_bbs_main").length && 0 < $(".left_menu").length) {
                var n = $(window).height() - $(".csdn_bbs_main").offset().top;
                $(".left_menu_box").height(n),
                window.addEventListener("scroll", (o = function() {
                    if (0 < $(".csdn_bbs_main").length && 0 < $(".left_menu").length)
                        var t = $(".csdn_bbs_main").offset().top
                          , e = $(".left_menu");
                    var o = t
                      , a = $(window).scrollTop();
                    o < a ? window.XMLHttpRequest ? ($(".left_menu_box").css({
                        height: "100%"
                    }),
                    e.css({
                        position: "fixed",
                        top: 0
                    })) : ($(".left_menu_box").css({
                        height: "100%"
                    }),
                    e.css({
                        top: a
                    })) : ($(".left_menu_box").css({
                        height: n
                    }),
                    e.css({
                        position: "absolute",
                        top: "0px"
                    }))
                }
                ,
                a = 200,
                i = 100,
                l = new Date,
                function() {
                    var t = arguments
                      , e = new Date;
                    clearTimeout(s),
                    i <= e - l ? (o.apply(this, t),
                    l = e) : s = setTimeout(o, a)
                }
                ))
            }
            var o, a, i, s, l;
            $(".pub_fo").length && $(".left_menu").length && $(".pub_fo").addClass("pad_left"),
            $(".left_menu .btn_toggle_hide").click(function() {
                $(".left_menu").css({
                    left: -210
                }),
                $(".csdn_bbs_main").removeClass("pad_left"),
                $("#csdn-toolbar").addClass("no_pad_left"),
                $("div.news-nav").addClass("no_pad_left"),
                $(".pub_fo").length && $(".left_menu").length && $(".pub_fo").removeClass("pad_left"),
                $(this).toggle(),
                $(".left_menu .btn_toggle_show").toggle()
            }),
            $(".left_menu .btn_toggle_show").click(function() {
                $(".left_menu").css({
                    left: 0
                }),
                $("div.news-nav").removeClass("no_pad_left"),
                $("#csdn-toolbar").removeClass("no_pad_left"),
                $(".csdn_bbs_main").addClass("pad_left"),
                $(".pub_fo").length && $(".left_menu").length && $(".pub_fo").addClass("pad_left"),
                $(this).toggle(),
                $(".left_menu .btn_toggle_hide").toggle()
            })
        },
        fixFooter: function() {
            var e = $(".fixed_dl");
            if (0 < e.length) {
                var o = e.offset().top;
                e.offset().left;
                $(window).scroll(function() {
                    var t = $(this).scrollTop();
                    o + 10 <= t ? e.css({
                        position: "fixed",
                        top: "0px",
                        "z-index": 1
                    }) : e.css({
                        position: "relative",
                        top: "0",
                        "z-index": 1
                    })
                })
            }
        },
        userHead: function() {
            $(".topic_wrap .user_head").hover(function(t) {
                var o = $(this);
                o.data("allow_show", !0);
                var e = o.find(".user_material");
                if (e.length)
                    e.show();
                else if (!o.data("fetched")) {
                    o.data("fetched", !0);
                    var a = CFG.API_URL + "users/" + o.data("username") + "/info";
                    $.ajax({
                        url: a
                    }).success(function(t) {
                        t = $(t);
                        var e = "user_meterial_" + Date.now();
                        t.attr("id", e),
                        follow_status(t),
                        o.data("allow_show") || t.hide(),
                        o.append(t)
                    })
                }
            }, function(t) {
                var e = $(this);
                e.data("allow_show", !1),
                e.find(".user_material").hide()
            })
        },
        userLevel: function() {
            $(".topic_show_user_level").hover(function() {
                $(this).next(".topic_show_posts").show()
            }, function() {
                $(this).next(".topic_show_posts").hide()
            })
        },
        dropMenu: function() {
            $(".drop_menu_wrap").hover(function() {
                $(this).addClass("menu_cur").find(".drop_menu").show()
            }, function() {
                $(this).removeClass("menu_cur").find(".drop_menu").hide()
            })
        },
        praise_stamp: function() {
            var t = this;
            $(".praise").hover(function() {
                t.thumbFn(this, "#csdnc-thumbsup-ok")
            }, function() {
                t.thumbFn(this, "#csdnc-thumbsup")
            }),
            $(".stamp").hover(function() {
                t.thumbFn(this, "#csdnc-thumbsdown-ok")
            }, function() {
                t.thumbFn(this, "#csdnc-thumbsdown")
            })
        },
        thumbFn: function(t, e) {
            $(t).find("use").attr("xlink:href", e)
        },
        popFn: function() {
            $(".bbs_drop_menu li");
            var t = $(".pop_close")
              , e = this;
            t.on("click", function(t) {
                e.popHide(),
                t.stopPropagation()
            })
        },
        popShow: function() {
            var t = $(".bbs_popup_wrap");
            $("#mask").show(),
            t.show();
            var e = t.height();
            t.css({
                marginTop: -e / 2
            })
        },
        popHide: function() {
            $("#mask").hide(),
            $(".bbs_popup_wrap").hide()
        },
        addPad: function() {
            $(".topic_l").each(function() {
                $(this).find(".close_topic").length && $(this).addClass("topic_owner")
            })
        }
    };
    a.tab(),
    a.leftMenu(),
    a.fixFooter(),
    a.userHead(),
    a.userLevel(),
    a.dropMenu(),
    a.praise_stamp(),
    a.popFn(),
    a.addPad(),
    $(".bbs_drop_menu li").each(function() {
        var t = $(this).attr("type")
          , e = $(this).find("a").text();
        null != t && "" != t && $(this).on("click", function() {
            showDialog(t, e)
        })
    }),
    $(".topic_wrap").delegate(".quote", "click", function(t) {
        var n = $(this).closest(".post");
        if (!n.data().isTopicLocked) {
            t.preventDefault(),
            t.stopPropagation();
            var e = $(this).parents(".mod_topic_wrap").data("postId");
            $.getJSON(CFG.API_URL + "posts/" + e + ".json", function(t) {
                var e = t.content
                  , o = n.find(".post_info")
                  , a = $("#post_body");
                e = o.hasClass("floorOwner") ? "[quote=引用 楼主 " + o.data("nickname") + " 的回复:]\n" + e + "[/quote]" : "[quote=引用 " + o.data("floor") + " 楼 " + o.data("nickname") + " 的回复:]\n" + e + "[/quote]",
                "" !== a.val() && (e = "\n\n" + e),
                a.focus().val(a.val() + e)
            })
        }
    }),
    $(".topic_wrap").delegate(".report_spam", "click", function(t) {
        var e = $(this).closest(".post");
        if (e.hasClass("topic"))
            var o = e.data("topicId");
        else
            o = e.data("postId");
        comAjaxFn(t, this, "/report?topic_id=" + o, "举报")
    }),
    $(".topic_wrap").delegate(".mana_edit", "click", function(t) {
        var e = $(this).closest(".post")
          , o = "bbs_edit_reply_" + e.data("topicId") + "_" + e.data("postId");
        comAjaxFn(t, this, "/edit", "编辑", function() {
            editStorage(o),
            e.hasClass("topic") ? (checkRemainChars("#bbsModal #topic_title", "#bbsModal #title_count_notice"),
            checkRemainChars("#bbsModal #topic_body", "#bbsModal #topic_body_count_notice")) : checkRemainChars("#bbsModal #post_body", "#bbsModal #edit_body_count_notice")
        })
    }),
    t = $(".mod_topic_wrap #post_body"),
    e = $(".mod_topic_wrap:first").data("topicId"),
    window.localStorage && localStorage.getItem(e) && t.val(JSON.parse(localStorage.getItem(e))),
    $(".mod_topic_wrap #post_body").on("keyup", throttle(keyupFn, 200, 600)),
    $(".topic_wrap").delegate(".mana_del", "click", function(t) {
        comAjaxFn(t, this, "/destroy_edit", "删除")
    }),
    $("#forums_search").on("click", function(t) {
        $("#subSearch").is(":hidden") && $("#subSearch").show(),
        t.stopPropagation()
    }),
    $("#subSearch").on("click", "li", function(t) {
        var e = $(this).text();
        $(this).addClass("sub_search_cur").siblings().removeClass("sub_search_cur").parents(".forums_search").find(".forums_txt").html(e),
        $("#subSearch").hide(),
        t.stopPropagation()
    }),
    a.checkAll = (o = !1,
    void $("#checkbox_btn").on("click", function() {
        o ? (allCheck("forums_del", !1),
        o = !1) : (allCheck("forums_del", !0),
        o = !0)
    })),
    $("#week .change_group").on("click", function() {
        geniusAjax(CFG.API_URL + "change_rank_group?group=weeks", "#week .genius_c")
    }),
    $("#month .change_group").on("click", function() {
        geniusAjax(CFG.API_URL + "change_rank_group?group=months", "#month .genius_c")
    }),
    $("#bbs_genius .change_group").on("click", function() {
        geniusAjax(CFG.API_URL + "change_rank_group?group=total", "#bbs_genius .genius_c")
    });
    (function(t) {
        for (var e = document.cookie.split("; "), o = 0; o < e.length; o++) {
            var a = e[o].split("=");
            if (a[0] == t && "UD" == t)
                return decodeURIComponent(a[1]);
            if (a[0] == t)
                return decodeURI(a[1])
        }
    }
    )("UserName") || function() {
        var t = $("#bbs_detail_wrap");
        if (0 < t.length) {
            var e = $(window).height()
              , o = 1.2 * e;
            CSDN.getUserName() ? (t.removeAttr("style"),
            $(".hide_topic_box").remove()) : (t.css({
                height: o,
                overflow: "hidden"
            }),
            t.append('<div class="hide_topic_box"> <div class="hide_topic_b"> <label class="show_topic js_show_topic"><span>查看全部</span><svg class="icon" aria-hidden="true"><use xlink:href="#csdnc-chevrondown"></use></svg></label></div></div>')),
            $(".js_show_topic").on("click", function() {
                return t.removeAttr("style"),
                $(this).parents(".hide_topic_box").remove(),
                setTimeout(function() {
                    n = parseInt(c.offset().top)
                }, 500),
                !1
            })
        }
    }();
    var n, i, s, l, c = $(".post_feed_box");
    c.length && setTimeout(function() {
        n = parseInt(c.offset().top)
    }, 1e3);
    !function() {
        var e = $("#bbs_title_bar");
        if (e.length && c.length) {
            var o = parseInt(e.offset().top);
            $(window).scroll(function() {
                var t = $(this).scrollTop();
                o <= t && t < n - 300 ? (e.addClass("title_bar_fixed"),
                $(".bbs_title_h").show()) : (e.removeClass("title_bar_fixed"),
                $(".bbs_title_h").hide())
            })
        }
    }(),
    i = window.localStorage,
    $(".icon_fullScreen").on("click", function() {
        var t = $(this).parents("html");
        if (t.hasClass("csdn_editor_fullscreen")) {
            if (t.removeClass("csdn_editor_fullscreen"),
            i.getItem("sTop")) {
                var e = i.getItem("sTop");
                $(document).scrollTop(e)
            }
        } else {
            var o = document.documentElement.scrollTop || document.body.scrollTop;
            i.setItem("sTop", o),
            t.addClass("csdn_editor_fullscreen")
        }
    }),
    s = $(".post_body"),
    l = s.find("img"),
    s.length && l.each(function(t, e) {
        0 == e.src.split("//")[1].indexOf("img-bbs.csdn.net") && $(this).addClass("csdn-preview-img")
    }),
    function() {
        var t = $("#topic_body")
          , e = $("#post_body");
        if (t.length) {
            var o = t.height();
            t.on("focus", function() {
                $(this).animate({
                    height: 2 * o
                }, 300)
            }),
            $(document).on("click", function(t) {
                doubleH(t, "#topic_body", "200px")
            })
        }
        if (e.length) {
            setTimeout(function() {
                var t = e.height();
                e.on("focus", function() {
                    $(this).animate({
                        height: 2 * t
                    }, 300)
                }),
                $(document).on("click", function(t) {
                    doubleH(t, "#post_body", "100px")
                })
            }, 1e3)
        }
    }();
    var r;
    (r = $(".reply_topic")).length && (CSDN.getUserName() ? r.removeAttr("data-bind-login") : r.attr("data-bind-login", !0),
    r.on("click", function(t) {
        if (CSDN.getUserName()) {
            var e = window.location.href;
            e.indexOf("#new_post") < 0 && (e.indexOf("#post-") < 0 ? e += "#new_post" : (windowH = e.split("#"),
            e = windowH[0] + "#new_post")),
            $(this).attr("href", e)
        } else
            window.csdn.loginBox.show();
        t.stopPropagation()
    }))
});
var AutoTag = function(t) {
    if (!jQuery)
        return console.error("需要引用jquery"),
        !1;
    var i = this
      , s = {
        tagBox: $("div.tag-box"),
        iptTags: $("#hidTags"),
        addBtn: $("#addTag"),
        splitStr: ",",
        maxTagLen: 5,
        funAfterEditor: null,
        funAfterDel: null,
        isEditorble: !0,
        quickNext: [13, 188, 229]
    };
    t && $.extend(s, t),
    s.isEditorble && s.tagBox.on("click", "span.name", function() {
        $(this).prop("contenteditable", !0);
        var t = $(this);
        o(t)
    }),
    s.tagBox.on("keyup", "span.name", function(e) {
        e.stopPropagation();
        if (void 0 !== s.quickNext.find(function(t) {
            return t == e.which
        }) && (13 !== (e = e).which && (this.innerText = this.innerText.substring(0, this.innerText.length - 1)),
        $(this).trigger("focusout"),
        0 < s.quickNext.length && l())) {
            var t = s.addTag("");
            o(t.find("span.name")),
            l()
        }
    }),
    s.tagBox.on("keydown", "span.name", function(t) {
        if (t.stopPropagation(),
        13 === t.which)
            return !1
    });
    var l = function() {
        var t = !0;
        return 0 < s.maxTagLen && (s.tagBox.find("div.tag").length === s.maxTagLen ? (s.addBtn.prop("disabled", !0),
        t = !1) : (s.addBtn.prop("disabled", !1),
        t = !0)),
        t
    }
      , c = function() {
        var o = s.tagBox.find("span.name")
          , a = ""
          , n = s.splitStr;
        o.text(function(t, e) {
            30 < e.length && (e = e.substring(0, 30)),
            $(o[t]).text(e),
            a += (0 < t ? n : "") + e
        }),
        i.allTagsVal = a,
        s.iptTags.val(a)
    }
      , o = function(t) {
        var a = s.funAfterEditor
          , n = s.iptTags.val()
          , e = t;
        setTimeout(function() {
            e.focus(),
            e.one("focusout", function() {
                var e = $(this).text().trim()
                  , t = new RegExp("," + e + "$|^" + e + ",|," + e + ",|^" + e + "$","i");
                if (!e || t.test(n))
                    if (e) {
                        var o = n.split(",").findIndex(function(t) {
                            return t === e
                        });
                        $(this).parent().index("div.tag") !== o && $(this).parent().remove()
                    } else
                        $(this).parent().remove();
                else
                    c(),
                    $(this).prop("contenteditable", !1),
                    null !== a && a($(this).parent("div.tag"), e);
                l(),
                s.setlocalstorage()
            })
        }, 100)
    };
    return s.setlocalstorage = function() {
        window.localStorage && localStorage.setItem("invite_reply", s.iptTags.val())
    }
    ,
    s.addTag = function(t) {
        var e = $('<div class="tag"><span class="name" ' + (t ? "" : 'contenteditable="true"') + '></span><svg class="icon icon-guanbi" aria-hidden="true"><use xlink:href="#csdnc-delete"></use></svg></div>');
        return e.find("span.name").text(t),
        s.addBtn.before(e),
        e
    }
    ,
    s.addBtn.click(function() {
        var t = s.addTag("");
        return o(t.find("span.name")),
        !1
    }),
    s.tagBox.on("click", ".icon-guanbi", function(t) {
        var e, o;
        e = $(this).parent(),
        o = e.find("span.name").text(),
        e.remove(),
        c(),
        l(),
        null !== s.funAfterDel && s.funAfterDel(o),
        s.setlocalstorage()
    }),
    i.allTagsVal = "",
    i.loadTags = function(t) {
        if (t)
            for (var e = t.split(s.splitStr), o = s.funAfterEditor, a = 0; a < e.length; a++) {
                var n = s.addTag(e[a]);
                l(),
                i.allTagsVal = t,
                null !== o && o(n, e[a])
            }
    }
    ,
    window.localStorage && localStorage.getItem("invite_reply") && i.loadTags(localStorage.getItem("invite_reply")),
    i.addTag = function(t) {
        if (l()) {
            var e = s.addTag(t);
            return c(),
            s.funAfterEditor(e, t),
            l(),
            e
        }
        return !1
    }
    ,
    i
}
  , topicTag = new AutoTag({
    tagBox: $("#articleTagBox"),
    iptTags: $("#hidTags"),
    addBtn: $("#addTag"),
    maxTagLen: 5,
    isEditorble: !0
})
  , addIntiver = new AutoTag({
    tagBox: $("#MansBox"),
    iptTags: $("#hidMans"),
    addBtn: $("#addMan"),
    maxTagLen: 5,
    isEditorble: !0
});
!function(l) {
    var t, s = '<svg><symbol id="csdnbbs-fileopen" viewBox="0 0 1024 1024"><path d="M0 841.152h896l-18.272 73.152c-10.976 40.384-38.208 73.152-85.344 73.152H85.344C38.208 987.456 0 954.72 0 914.304v-73.152z" fill="#DBDBDB" ></path><path d="M877.728 329.152H1024L891.552 858.88a73.12 73.12 0 0 1-70.944 55.392H73.152A73.152 73.152 0 0 1 0 841.12V109.696a73.152 73.152 0 0 1 73.152-73.152h239.84c31.488 0 59.424 20.16 69.376 50.016l32.096 96.288h390.08A73.152 73.152 0 0 1 877.696 256v73.152z" fill="#4788C7" ></path><path d="M804.576 329.152H146.304l-73.152 292.576v-512h239.84L361.76 256h442.816z" fill="#B6DCFE" ></path><path d="M930.336 402.272H203.424L93.696 841.12h726.912z" fill="#DFF0FE" ></path></symbol><symbol id="csdnbbs-subfile" viewBox="0 0 1024 1024"><path d="M73.12 877.737141h877.673145v73.147429a73.147428 73.147428 0 0 1-73.147428 73.147428H146.267428A73.147428 73.147428 0 0 1 73.12 950.88457v-73.147429z" fill="#DBDBDB" ></path><path d="M146.267428 0.063996h481.249922c19.646772 0 38.461596 7.903506 52.220736 21.91863l250.128367 253.584151c13.407162 13.663146 20.926692 32.061996 20.926692 51.1968v550.909568a73.147428 73.147428 0 0 1-73.147428 73.147429H146.267428A73.147428 73.147428 0 0 1 73.12 877.673145V73.147428A73.147428 73.147428 0 0 1 146.267428 0z" fill="#4788C7" ></path><path d="M146.267428 73.211424v804.525717h731.378289v-511.968002H585.088002V73.211424H146.267428z m511.968002 31.134054v188.276233h185.684395l-185.684395-188.276233z" fill="#FFFFFF" ></path></symbol><symbol id="csdnbbs-file" viewBox="0 0 1024 1024"><path d="M0 841.152h1024v73.152c0 40.384-38.208 73.152-85.344 73.152H85.312c-47.136 0-85.344-32.736-85.344-73.152v-73.152z" fill="#DBDBDB" ></path><path d="M414.464 182.848h536.384A73.152 73.152 0 0 1 1024 256v585.152a73.152 73.152 0 0 1-73.152 73.152H73.12a73.152 73.152 0 0 1-73.152-73.152V109.728a73.152 73.152 0 0 1 73.152-73.152H312.96c31.488 0 59.424 20.16 69.376 50.016l32.096 96.288z" fill="#4788C7" ></path><path d="M73.152 256v585.152h877.728V256z" fill="#DFF0FE" ></path><path d="M337.376 182.848l-24.384-73.152H73.152v73.152z" fill="#B6DCFE" ></path></symbol><symbol id="csdnbbs-fileuser" viewBox="0 0 1024 1024"><path d="M0 841.152h1024v73.152c0 40.384-38.208 73.152-85.344 73.152H85.312c-47.136 0-85.344-32.736-85.344-73.152v-73.152z" fill="#DBDBDB" ></path><path d="M414.464 182.848h536.384A73.152 73.152 0 0 1 1024 256v585.152a73.152 73.152 0 0 1-73.152 73.152H73.12a73.152 73.152 0 0 1-73.152-73.152V109.728a73.152 73.152 0 0 1 73.152-73.152H312.96c31.488 0 59.424 20.16 69.376 50.016l32.096 96.288z" fill="#4788C7" ></path><path d="M731.424 841.152c-8.672-122.592-103.776-219.424-219.424-219.424s-210.72 96.832-219.424 219.424H73.152V256h877.728v585.152h-219.424zM512 548.576a109.728 109.728 0 1 0 0-219.424 109.728 109.728 0 0 0 0 219.424z" fill="#DFF0FE" ></path><path d="M337.376 182.848l-24.384-73.152H73.152v73.152z" fill="#B6DCFE" ></path></symbol><symbol id="csdnbbs-filemark" viewBox="0 0 1024 1024"><path d="M0 841.152h1024v73.152c0 40.384-38.208 73.152-85.344 73.152H85.312c-47.136 0-85.344-32.736-85.344-73.152v-73.152z" fill="#DBDBDB" ></path><path d="M414.464 182.848h536.384A73.152 73.152 0 0 1 1024 256v585.152a73.152 73.152 0 0 1-73.152 73.152H73.12a73.152 73.152 0 0 1-73.152-73.152V109.728a73.152 73.152 0 0 1 73.152-73.152H312.96c31.488 0 59.424 20.16 69.376 50.016l32.096 96.288z" fill="#4788C7" ></path><path d="M73.152 256h877.728v585.152H73.152V256zM512 708.384l111.072 57.12a22.24 22.24 0 0 0 13.504 2.24c12.672-1.888 21.44-14.176 19.616-27.424l-17.632-128.128 86.272-92.832a24.512 24.512 0 0 0 6.208-12.736c2.176-13.184-6.272-25.696-18.88-28l-121.984-22.08-57.76-114.496a22.72 22.72 0 0 0-40.96 0l-57.76 114.496-121.984 22.08a22.88 22.88 0 0 0-12.192 6.496 24.992 24.992 0 0 0-0.48 34.24l86.272 92.832-17.632 128.128a25.28 25.28 0 0 0 2.144 14.144 22.72 22.72 0 0 0 31.008 11.04l111.072-57.12z" fill="#DFF0FE" ></path><path d="M337.376 182.848l-24.384-73.152H73.152v73.152z" fill="#B6DCFE" ></path></symbol><symbol id="csdnbbs-edit" viewBox="0 0 1024 1024"><path d="M365.728 877.728l-219.424-219.424L804.576 0.032 1024 219.456 365.728 877.728zM0 804.576l73.152-73.152 219.424 219.424L219.424 1024H0v-219.424z"  ></path></symbol><symbol id="csdnc-delete" viewBox="0 0 1024 1024"><path d="M877.728 0L512 365.728 146.272 0 0 146.272 365.824 512 0 877.728 146.272 1024 512 658.272 877.728 1024 1024 877.728 658.208 512 1024 146.272z"  ></path></symbol><symbol id="csdnc-light" viewBox="0 0 1024 1024"><path d="M219.851795 438.841463H117.74139a44.031312 44.031312 0 0 1-41.759347-58.175091L190.892247 49.31155A73.59885 73.59885 0 0 1 260.49116 0.00032h503.800128a73.59885 73.59885 0 0 1 69.598912 49.31123l114.910205 331.354822a43.839315 43.839315 0 0 1-27.359573 55.775129 44.15931 44.15931 0 0 1-14.399775 2.399962h-102.110404a292.571429 292.571429 0 0 1-585.142857 0z m73.150857 0a219.420572 219.420572 0 0 0 438.841143 0H293.002652z m330.106842 375.834128a51.1992 51.1992 0 0 1 65.630974 30.591522l40.031375 109.982281a51.2312 51.2312 0 0 1-96.222497 35.039453l-40.031374-109.982282a51.2312 51.2312 0 0 1 30.591522-65.630974z m-221.340542 0a51.1992 51.1992 0 0 1 30.591522 65.630974l-40.031374 109.982282a51.1992 51.1992 0 0 1-96.222497-35.039453l40.031375-109.982281a51.1992 51.1992 0 0 1 65.630974-30.591522z m379.354073-107.134326a51.1992 51.1992 0 0 1 72.414868 0l82.750707 82.750707a51.1992 51.1992 0 1 1-72.414868 72.414868l-82.750707-82.750707a51.1992 51.1992 0 0 1 0-72.414868z m-537.399603 0a51.1992 51.1992 0 0 1 0 72.414868L160.972715 862.70684a51.1992 51.1992 0 1 1-72.414869-72.414868l82.750707-82.750707a51.1992 51.1992 0 0 1 72.414869 0z"  ></path></symbol><symbol id="csdnc-addpoints" viewBox="0 0 1024 1024"><path d="M146.272 950.848h731.424V1024H146.272A146.272 146.272 0 0 1 0 877.728V146.304h73.152v731.424a73.152 73.152 0 0 0 73.152 73.152zM219.424 0h731.424A73.152 73.152 0 0 1 1024 73.152v731.424a73.152 73.152 0 0 1-73.152 73.152H219.424a73.152 73.152 0 0 1-73.152-73.152V73.152A73.152 73.152 0 0 1 219.424 0zM512 365.728h-146.272a73.152 73.152 0 0 0 0 146.304H512v146.272a73.152 73.152 0 0 0 146.304 0v-146.272h146.272a73.152 73.152 0 0 0 0-146.304h-146.272V219.456a73.152 73.152 0 0 0-146.304 0v146.272z"  ></path></symbol><symbol id="csdnbbs-lock" viewBox="0 0 1024 1024"><path d="M219.401144 365.758855V292.610284a292.562286 292.562286 0 0 1 585.124572 0v73.148571h73.148571a73.148571 73.148571 0 0 1 73.148571 73.148571v511.976001a73.148571 73.148571 0 0 1-73.148571 73.148572H146.284571A73.148571 73.148571 0 0 1 73.136 950.883427v-511.976001a73.148571 73.148571 0 0 1 73.148571-73.148571h73.148571z m438.859428 0V292.610284a146.265144 146.265144 0 1 0-292.530287 0v73.148571h292.562286zM365.698286 694.863428c0 80.444229 65.820915 146.265144 146.265144 146.265144s146.265144-65.820915 146.265144-146.265144-65.820915-146.265144-146.265144-146.265144-146.265144 65.820915-146.265144 146.265144z"  ></path></symbol><symbol id="csdnbbs-recommend" viewBox="0 0 1024 1024"><path d="M146.272 0A146.272 146.272 0 0 0 0 146.272v731.424a146.272 146.272 0 0 0 146.272 146.272h731.424a146.272 146.272 0 0 0 146.272-146.272V146.272A146.272 146.272 0 0 0 877.696 0H146.272z m512 804.576v-73.152h-219.424v-73.152h292.576v-73.152h-292.576v-73.152h438.848v73.152h-73.152v73.152h73.152v73.152h-146.272v146.272h-292.576v-73.152h219.424zM292.576 365.728V292.576H146.304V219.424h146.272V146.272h73.152v73.152h292.576V146.272h73.152v73.152h146.272v73.152h-146.272v73.152h146.272v73.152h-512v438.848H292.576v-219.424H219.424v-73.152h73.152v-146.272H146.304v-73.152h146.272z m73.152 0h292.576V292.576h-292.576v73.152z m-219.456 292.544h73.152v73.152H146.272v-73.152z"  ></path></symbol><symbol id="csdnbbs-arrows" viewBox="0 0 1024 1024"><path d="M219.424 585.152v146.272L0 512l219.424-219.424v146.272h219.424V219.424H292.576L512 0l219.424 219.424h-146.272v219.424h219.424V292.576L1024 512l-219.424 219.424v-146.272h-219.424v219.424h146.272L512 1024l-219.424-219.424h146.272v-219.424z"  ></path></symbol><symbol id="csdnbbs-up" viewBox="0 0 1024 1024"><path d="M512 0l512 512h-292.576v365.728H292.576V512H0L512 0zM73.152 950.848h877.728V1024H73.152v-73.152z"  ></path></symbol><symbol id="csdnbbs-rss" viewBox="0 0 1024 1024"><path d="M146.285714 0h731.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v731.428572a146.285714 146.285714 0 0 1-146.285714 146.285714H146.285714a146.285714 146.285714 0 0 1-146.285714-146.285714V146.285714a146.285714 146.285714 0 0 1 146.285714-146.285714z m73.142857 877.714286a73.142857 73.142857 0 1 0 0-146.285715 73.142857 73.142857 0 0 0 0 146.285715z m658.285715 0C877.714286 473.746286 550.253714 146.285714 146.285714 146.285714v146.285715a585.142857 585.142857 0 0 1 585.142857 585.142857h146.285715z m-292.571429 0a438.857143 438.857143 0 0 0-438.857143-438.857143v146.285714a292.571429 292.571429 0 0 1 292.571429 292.571429h146.285714z"  ></path></symbol><symbol id="csdnbbs-starok" viewBox="0 0 1024 1024"><path d="M511.899224 884.958242l-259.143636 133.219024a52.980477 52.980477 0 0 1-72.304274-25.722405 58.80321 58.80321 0 0 1-4.990914-33.016819l41.079065-298.878994L15.36722 443.966157a58.355308 58.355308 0 0 1 1.087763-79.854631A53.236421 53.236421 0 0 1 44.800818 348.946824l284.546111-51.508797L464.10162 30.360117a52.852505 52.852505 0 0 1 95.595208 0l134.754691 267.07791 284.546111 51.508797c29.369612 5.310845 49.077326 34.552485 43.958439 65.265805a57.459503 57.459503 0 0 1-14.460854 29.753528l-201.236232 216.592891 41.079066 298.878994c4.223081 30.905278-16.252465 59.507057-45.75005 63.986083a51.956699 51.956699 0 0 1-31.545139-5.246859L511.899224 884.958242z"  ></path></symbol><symbol id="csdnbbs-star" viewBox="0 0 1024 1024"><path d="M739.68968 639.187697L953.403197 409.349686l-301.694381-54.580128L511.899224 77.645832l-139.745605 277.05974-301.694382 54.580128L284.108769 639.187697l-43.062634 313.083904L511.899224 812.973898l270.85309 139.297703-43.062634-313.083904zM511.899224 884.894255L252.755588 1018.241253a52.980477 52.980477 0 0 1-72.304274-25.722406 58.80321 58.80321 0 0 1-4.990914-33.016819l41.079065-298.878994L15.36722 443.966157a58.355308 58.355308 0 0 1 1.087763-79.854631A53.236421 53.236421 0 0 1 44.800818 348.946824l284.546111-51.508797L464.10162 30.360117a52.852505 52.852505 0 0 1 95.595208 0l134.754691 267.07791 284.546111 51.508797c29.369612 5.310845 49.077326 34.552485 43.958439 65.265805a57.459503 57.459503 0 0 1-14.460854 29.753528l-201.236232 216.592891 41.079066 298.878994c4.223081 30.905278-16.252465 59.507057-45.75005 63.986083a51.956699 51.956699 0 0 1-31.545139-5.246859L511.899224 884.958242z"  ></path></symbol><symbol id="csdnbbs-filedown" viewBox="0 0 1024 1024"><path d="M73.12 877.728h877.728v73.152a73.152 73.152 0 0 1-73.152 73.152H146.272A73.152 73.152 0 0 1 73.12 950.88v-73.152z" fill="#DBDBDB" ></path><path d="M146.272 0h554.432c19.648 0 38.464 7.904 52.224 21.92l176.992 180.48c13.408 13.664 20.928 32.064 20.928 51.2v624.096a73.152 73.152 0 0 1-73.152 73.152H146.272A73.152 73.152 0 0 1 73.12 877.696V73.12A73.152 73.152 0 0 1 146.272-0.032z" fill="#4788C7" ></path><path d="M146.272 73.152v804.576h731.424V253.632l-176.992-180.48z" fill="#FFFFFF" ></path><path d="M511.968 731.424L292.544 512h146.272V292.576h146.272V512h146.272z" fill="#4788C7" ></path></symbol><symbol id="csdnbbs-drop" viewBox="0 0 1024 1024"><path d="M307.2 0h409.632v511.968h183.584a51.2 51.2 0 0 1 36.192 87.424l-424.576 424.64-424.64-424.64A51.2 51.2 0 0 1 123.584 512H307.2V0.032z" fill="#FF630D" ></path><path d="M776.832 614.368h-162.368V102.4h-204.832v511.968H247.232l264.832 264.864z" fill="#FFA783" ></path></symbol><symbol id="csdnbbs-rise" viewBox="0 0 1024 1024"><path d="M307.2 1024h409.632V512.032h183.584a51.2 51.2 0 0 0 36.192-87.424L512.032-0.032l-424.64 424.64A51.2 51.2 0 0 0 123.584 512H307.2v511.968z" fill="#2E942E" ></path><path d="M776.832 409.632h-162.368V921.6h-204.832V409.632H247.232l264.832-264.864z" fill="#6FD46F" ></path></symbol><symbol id="csdnbbs-manage" viewBox="0 0 1195 1024"><path d="M85.333 0h1024c47.128 0 85.333 38.205 85.333 85.333v853.333c0 47.128-38.205 85.333-85.333 85.333h-1024C38.205 1023.999 0 985.794 0 938.666V85.333C0 38.205 38.205 0 85.333 0z" fill="#B6DCFE" ></path><path d="M349.593 682.667c18.302-49.084 65.01-83.979 119.74-83.979s101.438 34.895 119.74 83.979h434.926V768H591.388c-16.393 52.615-64.84 90.751-122.056 90.751S363.669 820.615 347.276 768H170.665v-85.333h178.926zM603.277 256c16.393-52.615 64.84-90.751 122.056-90.751S830.996 203.385 847.389 256H1024v85.333H845.074c-18.302 49.084-65.01 83.979-119.74 83.979s-101.438-34.895-119.74-83.979H170.668V256h432.611zM469.333 773.418c23.261 0 42.667-19.714 42.667-44.698s-19.406-44.698-42.667-44.698c-23.261 0-42.667 19.714-42.667 44.698s19.406 44.698 42.667 44.698z m256-433.439c23.261 0 42.667-19.714 42.667-44.698s-19.406-44.698-42.667-44.698c-23.261 0-42.667 19.714-42.667 44.698s19.406 44.698 42.667 44.698z" fill="#4788C7" ></path></symbol><symbol id="csdnbbs-up2" viewBox="0 0 1024 1024"><path d="M512 0L0 512h256v512h512V512h256z" fill="#59B300" ></path></symbol><symbol id="csdnbbs-add" viewBox="0 0 1024 1024"><path d="M365.714 365.714V73.143C365.714 32.747 398.461 0 438.857 0h146.286c40.396 0 73.143 32.747 73.143 73.143v292.571h292.571c40.396 0 73.143 32.747 73.143 73.143v146.286c0 40.396-32.747 73.143-73.143 73.143H658.286v292.571c0 40.396-32.747 73.143-73.143 73.143H438.857c-40.396 0-73.143-32.747-73.143-73.143V658.286H73.143C32.747 658.286 0 625.539 0 585.143V438.857c0-40.396 32.747-73.143 73.143-73.143h292.571z" fill="#2E942E" ></path><path d="M438.857 73.143v365.714H73.143v146.286h365.714v365.714h146.286V585.143h365.714V438.857H585.143V73.143z" fill="#6FD46F" ></path></symbol><symbol id="csdnbbs-0" viewBox="0 0 1024 1024"><path d="M170.656 256v597.344l128-170.656h554.656V256.032H170.656z m0-85.344h682.656A85.344 85.344 0 0 1 938.656 256v426.656A85.344 85.344 0 0 1 853.312 768h-512l-102.4 136.544a85.312 85.312 0 0 1-153.6-51.2V256a85.344 85.344 0 0 1 85.344-85.344z" fill="#CCCCCC" ></path></symbol><symbol id="csdnbbs-1" viewBox="0 0 1024 1024"><path d="M728.992 320L652.48 243.488a42.656 42.656 0 1 1 60.352-60.352l76.512 76.512 76.512-76.512a42.656 42.656 0 1 1 60.352 60.352L849.696 320l76.512 76.512a42.656 42.656 0 1 1-60.352 60.352l-76.512-76.512-76.512 76.512a42.656 42.656 0 1 1-60.352-60.352L728.992 320z" fill="#F21F2B" ></path><path d="M170.656 256v597.344l128-170.656h554.656v-128a42.656 42.656 0 0 1 85.312 0v128a85.344 85.344 0 0 1-85.344 85.344h-512l-102.4 136.544a85.312 85.312 0 0 1-153.6-51.2V256.032a85.344 85.344 0 0 1 85.344-85.344l384 0.224c21.408 0 38.4 20.32 38.4 42.464s-16.704 42.656-38.4 42.656h-384z" fill="#CCCCCC" ></path></symbol><symbol id="csdnbbs-2" viewBox="0 0 1024 1024"><path d="M170.656 256v597.344l128-170.656h554.656v-256a42.656 42.656 0 0 1 85.312 0v256a85.344 85.344 0 0 1-85.344 85.344h-512l-102.4 136.544a85.312 85.312 0 0 1-153.6-51.2V256.032a85.344 85.344 0 0 1 85.344-85.344l512 0.224c21.408 0 38.4 20.32 38.4 42.464s-16.704 42.656-38.4 42.656h-512z" fill="#CCCCCC" ></path><path d="M585.92 464.448l277.024-277.024a42.656 42.656 0 1 1 60.352 60.352l-307.2 307.2a42.656 42.656 0 0 1-60.352 0l-141.44-141.44a42.656 42.656 0 1 1 60.352-60.352l111.264 111.264z" fill="#86CA5E" ></path></symbol><symbol id="csdnbbs-3" viewBox="0 0 1024 1024"><path d="M810.656 421.28v48.064a42.656 42.656 0 0 1-85.312 0V384c0-23.552 19.104-42.656 42.656-42.656A85.344 85.344 0 1 0 682.656 256a42.656 42.656 0 0 1-85.312 0 170.656 170.656 0 1 1 213.312 165.28zM768 622.944a42.656 42.656 0 1 1 0-85.344 42.656 42.656 0 0 1 0 85.344z" fill="#3399EA" ></path><path d="M170.656 256v597.344l128-170.656h554.656v-170.656a42.656 42.656 0 0 1 85.312 0v170.656a85.344 85.344 0 0 1-85.344 85.344h-512l-102.4 136.544a85.312 85.312 0 0 1-153.6-51.2V256.032a85.344 85.344 0 0 1 85.344-85.344l341.344 0.224c21.408 0 38.4 20.32 38.4 42.464s-16.704 42.656-38.4 42.656H170.624z" fill="#CCCCCC" ></path></symbol></svg>', e = (t = document.getElementsByTagName("script"))[t.length - 1].getAttribute("data-injectcss");
    if (e && !l.__iconfont__svg__cssinject__) {
        l.__iconfont__svg__cssinject__ = !0;
        try {
            document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")
        } catch (t) {
            console && console.log(t)
        }
    }
    !function(t) {
        if (document.addEventListener)
            if (~["complete", "loaded", "interactive"].indexOf(document.readyState))
                setTimeout(t, 0);
            else {
                var e = function() {
                    document.removeEventListener("DOMContentLoaded", e, !1),
                    t()
                };
                document.addEventListener("DOMContentLoaded", e, !1)
            }
        else
            document.attachEvent && (o = t,
            a = l.document,
            n = !1,
            i = function() {
                n || (n = !0,
                o())
            }
            ,
            (s = function() {
                try {
                    a.documentElement.doScroll("left")
                } catch (t) {
                    return void setTimeout(s, 50)
                }
                i()
            }
            )(),
            a.onreadystatechange = function() {
                "complete" == a.readyState && (a.onreadystatechange = null,
                i())
            }
            );
        var o, a, n, i, s
    }(function() {
        var t, e, o, a, n, i;
        (t = document.createElement("div")).innerHTML = s,
        s = null,
        (e = t.getElementsByTagName("svg")[0]) && (e.setAttribute("aria-hidden", "true"),
        e.style.position = "absolute",
        e.style.width = 0,
        e.style.height = 0,
        e.style.overflow = "hidden",
        o = e,
        (a = document.body).firstChild ? (n = o,
        (i = a.firstChild).parentNode.insertBefore(n, i)) : a.appendChild(o))
    })
}(window),
function(t, o) {
    "use strict";
    t.addEventListener("DOMContentLoaded", function() {
        var e = o.location.href.replace(o.location.hash, "");
        [].slice.call(t.querySelectorAll("use[*|href]")).filter(function(t) {
            return 0 === t.getAttribute("xlink:href").indexOf("#")
        }).forEach(function(t) {
            t.setAttribute("xlink:href", e + t.getAttribute("xlink:href"))
        })
    }, !1)
}(document, window);
var topics_page_js = {};
function child_forum_html(t) {
    $("#select_child_forum").html($("#selectForumTemplate").tmpl({
        notice: "-选择小版块-",
        forums: t
    }))
}
topics_page_js.new_page = function(t) {
    $("#select_parent_forum, #select_child_forum").change(function() {
        $(this).find(":selected").data("tech-forum") ? ($("#topic_point").attr("min", 50),
        t < 50 && alert("您没有足够的可用分在技术区发帖")) : $("#topic_point").attr("min", 0)
    }),
    $("#select_child_forum").change(function() {
        var t = $(this).find(":selected").data("max-point");
        $("#topic_point").attr("max", t)
    });
    $("#new_topic").validate({
        rules: {
            "topic[body]": {
                maxlength: 1e4,
                minlength: 10
            }
        },
        submitHandler: function(t) {
            var e = $(t);
            e.data("load_submitted") || (e.data("load_submitted", !0),
            e.find(".submit_load_icon").after('<img src="/assets/icon_loading.gif" class="icon_loading" />'),
            t.submit(),
            localStorage.removeItem("new_pub_topic"),
            localStorage.removeItem("invite_reply"))
        }
    })
}
,
topics_page_js.show_page = function() {
    function e() {
        !0 === iframe_login_success_flag && location.reload()
    }
    $(".post_body img").each(function(t, e) {
        $(this).attr("src") && $(this).attr("src").match(new RegExp("https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin")) || $(this).addClass("image_border")
    }),
    $('select[name="filter_posts"]').change(function() {
        switch ($(this).val()) {
        case "default":
            $(".post_info:not(.deleted)").closest(".post").show(),
            $(".post_info.deleted").closest(".post").hide();
            break;
        case "all":
            $(".post").show();
            break;
        case "star":
            $(".post_info:not(.deleted)").closest(".post").show(),
            $(".post_info:not(.star, .topic)").closest(".post").hide();
            break;
        case "pointed":
            $(".post_info:not(.deleted)").closest(".post").show(),
            $(".post_info:not(.pointed, .topic)").closest(".post").hide();
            break;
        case "lz":
            window.location.href = window.location.pathname + "?list=lz";
            break;
        case "unlz":
            window.location.href = window.location.pathname
        }
    }),
    $("#fav").click(function() {
        var t = parseInt(screen.availWidth / 2 - 297.5, 0)
          , e = parseInt(screen.availHeight / 2 - 166.5, 0);
        return window.open(this.href, "_blank", "width=595,height=333,top=" + e + ",left=" + t + ",screenX=" + t + ",screenY=" + e + ",location=no,menubar=no,scrollbars=no,status=no,titlebar=no,toolbar=no,directories=no"),
        !1
    }),
    window.open_embeded_betting_iframe_login = function(t) {
        $.fancybox(CSDN.appConfig.csdn_passport_ssl_domain + "/account/loginbox?from=" + t, {
            type: "iframe",
            width: 350,
            height: 240,
            autoScale: !1,
            onClosed: e,
            hideOnOverlayClick: !1
        })
    }
    ,
    window.iframe_login_success_flag = !1,
    $(".post_body img").each(function(t, e) {
        (750 <= e.width || 750 <= e.height) && (e.title = "点击查看原始大小图片",
        $(e).addClass("magplus"),
        $(e).click(function() {
            window.open(e.src, "_blank")
        }))
    })
}
,
topics_page_js._form_page = function() {
    var t = function() {
        $("#title_count_notice").html($("#countTemplate").tmpl({
            count: 80 - $("#topic_title").val().length
        }))
    };
    t();
    var e = function() {
        $("#topic_body_count_notice").html($("#countTemplate").tmpl({
            count: 1e4 - $("#topic_body").val().length
        }))
    };
    e(),
    $("#topic_title").keyup(t),
    $("#topic_body").keyup(e),
    $("#topic_body").markItUp(bbcodeSettings)
}
,
topics_page_js._select_forum_page = function() {
    var t = $.map(forum_tree, function(t) {
        return t
    });
    $("#select_parent_forum").html($("#selectForumTemplate").tmpl({
        notice: "-选择大版块-",
        forums: t
    })),
    $("#select_parent_forum").change(function() {
        child_forum_html(forum_tree[$(this).val()] ? forum_tree[$(this).val()].child_forums : [])
    })
}
,
topics_page_js.close_edit_page = function(t) {
    var e = t
      , o = e
      , l = function() {
        o = e,
        $.each($("input.post_point"), function() {
            $(this).val().match(/\d+/) && (o -= parseInt($(this).val(), 0))
        }),
        $("#point_notice").replaceWith($("#pointNoticeTemplate").tmpl({
            total: e,
            last: o
        })),
        0 === o && $(".checkTotalNotice").remove()
    };
    $("input.post_point").mouseover(function() {
        $("#pointNoticeTemplate").tmpl({
            total: e,
            last: o
        }).insertAfter($(this)),
        $(this).select()
    }).mouseout(function() {
        $("#point_notice").remove()
    }).keyup(function() {
        $(this).valid() && l()
    }),
    $("#close_topic_form").validate({
        submitHandler: function(t) {
            0 === o ? ($(".close_submit").val("结帖给分...").prop("disabled", !0),
            t.submit()) : alert("给分与总分不符,请重新分配!")
        }
    }),
    $("a.average").click(function(t) {
        t.preventDefault();
        var a = $("input.post_point[value!=0]").map(function(t, e) {
            return $(e).data("username")
        })
          , n = [];
        $("input.post_point").each(function(t, e) {
            var o = $(e).data("username");
            -1 == $.inArray(o, a) && -1 == $.inArray(o, n) && n.push(o)
        });
        var e = n.length
          , i = parseInt(o / e, 0)
          , s = o % e;
        $.each(n, function(t, e) {
            var o = $("input.post_point[data-username=" + e + "]").first();
            0 < s ? (o.val(i + 1),
            s--) : o.val(i)
        }),
        l()
    })
}
,
topics_page_js.top_edit_page = function() {
    $("#search_parent_forum").click(function(t) {
        t.preventDefault(),
        "" !== $("#select_parent_forum").val() ? $("#select_parent_forum :selected").data("moderator") ? ($("input[name=forum_id]").val($("#select_parent_forum").val()),
        $("#top_topic_form").submit()) : alert("没有该版管理权限") : alert("请选择大版块")
    }),
    $("#search_child_forum").click(function(t) {
        t.preventDefault(),
        "" !== $("#select_child_forum").val() ? $("#select_child_forum :selected").data("moderator") ? ($("input[name=forum_id]").val($("#select_child_forum").val()),
        $("#top_topic_form").submit()) : alert("没有该版管理权限") : alert("请选择小版块")
    })
}
;
var posts_page_js = {
    _form_page: function() {
        $("#post_body").markItUp(bbcodeSettings),
        $("#post_body").keypress(function(t) {
            var e = t.which ? t.which : t.keyCode;
            if (10 === e || 13 == e && t.ctrlKey) {
                var o = $(this).closest("form");
                !0 !== o.find("#submit_new_post_form").prop("disabled") && o.submit()
            }
        });
        var t = function() {
            $("#body_count_notice").html($("#countTemplate").tmpl({
                count: 1e4 - $("#post_body").val().length
            }))
        };
        CSDN.getUserName() && t(),
        $("#post_body").keyup(t),
        jQuery.validator.addMethod("quoteOnly", function(t, e) {
            return this.optional(e) || (null === (a = /^\s*\[quote.*\][\s\S]*\[\/quote\]\s*$/im.exec(o = t)) || o != a[0]);
            var o, a
        }, "只有引用的内容不允许回复!");
        $("#new_post").validate({
            rules: {
                "post[body]": {
                    maxlength: 1e4,
                    minlength: 6
                }
            },
            submitHandler: function(t) {
                var n = $("#submit_new_post_form")
                  , i = n[0];
                i.disabled = !0,
                n.after('<img src="/assets/icon_loading.gif" class="icon_loading" />');
                var e = {
                    dataType: "json",
                    clearForm: !0,
                    error: function(t, e, o) {
                        i.disabled = !1,
                        n.next(".icon_loading").remove(),
                        403 == t.status && "需要登录" == t.responseText ? loginbox() : 400 <= t.status && t.status < 500 ? alert(t.responseText) : 503 == t.status ? alert(t.responseText + "!") : alert("添加回复失败,请重试")
                    },
                    success: function(t, e, o) {
                        i.disabled = !1,
                        n.next(".icon_loading").remove(),
                        location.href = t.redirect_to;
                        var a = $(".bbs_detail_wrap .mod_topic_wrap:first").data("topicId");
                        localStorage.removeItem(a)
                    }
                };
                $(t).ajaxSubmit(e)
            }
        }),
        window.iframe_login_success_flag = !1,
        $(".bbs_topic_loginbox_link").on("click", function(t) {
            t.preventDefault();
            var e = this;
            csdn.showLogin(function() {
                $(e).parent().remove()
            })
        })
    },
    edit_page: function() {
        $("#post_edit .body").markItUp(bbcodeSettings),
        $("form.publish").validate();
        var t = function() {
            $("#edit_body_count_notice").html($("#countTemplate").tmpl({
                count: 1e4 - $("#post_edit .body").val().length
            }))
        };
        t(),
        $("#post_edit .body").keyup(t)
    }
}
  , main_page_js = {};
function loginbox() {
    var t = $("#pop_win");
    t.html('<iframe src="//passport.csdn.net/account/loginbox?service=' + window.location.protocol + '//bbs.csdn.net/callback.html" frameborder="0" height="600" width="400" scrolling="no"></iframe>'),
    $("#popup_mask").css({
        opacity: .5,
        width: $(document).width() + "px",
        height: $(document).height() + "px"
    }),
    $("#popup_mask").css("display", "block"),
    t.css({
        top: ($(window).height() - t.height()) / 2 + $(window).scrollTop() + "px",
        left: ($(window).width() - t.width()) / 2
    }),
    setTimeout(function() {
        t.show(),
        t.css({
            opacity: 1
        })
    }, 200),
    $("#popup_mask").unbind("click"),
    $("#popup_mask").bind("click", function() {
        $("#popup_mask").hide();
        var t = $("#pop_win");
        return $("#common_ask_div_sc").css("display", "none"),
        t.css({
            opacity: 0
        }),
        setTimeout(function() {
            t.hide()
        }, 350),
        !1
    })
}
main_page_js.home_page = function() {
    CSDN.activeAttLink(".bbs_cow_c")
}
,
main_page_js.rank_page = function() {
    CSDN.activeAttLink(".bor_bot"),
    $(".bor_bot .attention_all").click(function(t) {
        if (t.preventDefault(),
        CSDN.getUserName()) {
            var n = $(this).closest(".bor_bot")
              , e = n.find(".genius_att:not(.followed)")
              , i = e.length;
            console.log(e);
            var s = 0;
            e.each(function(t, e) {
                var o = "//my.csdn.net/index.php/follow/do_follow"
                  , a = $(e).data("username");
                $.ajax({
                    type: "POST",
                    url: o,
                    data: {
                        username: a
                    },
                    dataType: "json",
                    success: function(t) {
                        1 == t.succ ? (n.find("a.genius_att[data-username=" + a + "]").addClass("followed").text("已关注"),
                        (s += 1) == i && alert("关注成功")) : alert(t.msg)
                    }
                }),
                $.getJSON(o, {
                    username: a
                }, function(t) {
                    1 == t.succ ? (n.find("a.genius_att[data-username=" + a + "]").addClass("followed").text("已关注"),
                    (s += 1) == i && alert("关注成功")) : alert(t.msg)
                })
            })
        } else
            alert("请先登录")
    }),
    $(".expert_point_main").hover(function() {
        $(this).find(".expert_point_details").show()
    }, function() {
        $(this).find(".expert_point_details").hide()
    })
}
,
main_page_js.medal_page = function() {
    $(".table_medals").on("click", "ul ~ a", function() {
        var t = $(this).prev("ul");
        $(t).is(":hidden") ? (t.slideDown(),
        this.innerHTML = "<<收起") : (t.slideUp(),
        this.innerHTML = "查看更多>>")
    })
}
,
document.domain = "csdn.net";
var forums_page_js = {
    rank_page: function() {
        var t = $.map(forum_tree, function(t) {
            return t
        });
        $("#select_parent_forum").html($("#selectForumTemplate").tmpl({
            notice: "-选择大论坛-",
            forums: t
        })),
        $("#select_parent_forum").change(function() {
            var t = forum_tree[$(this).val()] ? forum_tree[$(this).val()].child_forums : [];
            $("#select_child_forum").html($("#selectForumTemplate").tmpl({
                notice: "-选择小论坛-",
                forums: t
            }))
        }),
        $("#search_rank input[type=submit]").click(function(t) {
            $("#type").val($(this).attr("id"))
        }),
        $("#parent_month, #parent_total").click(function(t) {
            var e = $("#select_parent_forum").val();
            e ? $("#forum_id").val(e) : (t.preventDefault(),
            alert("请选择大论坛"))
        }),
        $("#child_month").click(function(t) {
            var e = $("#select_child_forum").val();
            e ? $("#forum_id").val(e) : (t.preventDefault(),
            alert("请选择小论坛"))
        })
    },
    show_page: function() {
        !function() {
            var e = $(".annbody-scroll");
            if (0 < e.length) {
                var o = !0;
                e.mouseover(function() {
                    o = !1
                }),
                e.mouseout(function() {
                    o = !0
                }),
                setInterval(function() {
                    if (o) {
                        var t = e.find("li:lt(3)");
                        e.append(t.clone()),
                        e.find("li").each(function(t, e) {
                            (t + 1) % 3 == 1 ? $(e).removeClass().addClass("left") : (t + 1) % 3 == 2 ? $(e).removeClass().addClass("center") : (t + 1) % 3 == 0 && $(e).removeClass().addClass("right")
                        }),
                        t.slideUp(function() {
                            $(this).remove()
                        })
                    }
                }, 5e3)
            }
        }()
    }
}
  , moderator_page_js = {
    main_index_page: function() {
        $(".submit").click(function(t) {
            t.preventDefault(),
            $(this).closest("form").submit()
        }),
        $("#checkout-management-form").on("submit", function(t) {
            t.preventDefault(),
            "" !== this.child_forum_urlname.value ? this.submit() : alert("请选择小版块")
        })
    },
    _moderators_select_forum_page: function() {
        var t = $.map(forum_tree, function(t) {
            return t
        });
        $("#select_parent_forum").html($("#selectForumTemplate").tmpl({
            notice: "-选择大版块-",
            forums: t
        })),
        $("#select_parent_forum").change(function() {
            var t = forum_tree[$(this).val()] ? forum_tree[$(this).val()].child_forums : [];
            $("#select_child_forum").html($("#selectForumTemplate").tmpl({
                notice: "-选择小版块-",
                forums: t
            }))
        })
    },
    moderators_index_page: function() {
        $("#moderator_form").validate(),
        $("#moderator_form .btn_b").click(function(t) {
            t.preventDefault(),
            "" === $("#select_child_forum").val() ? alert("请选择小版") : ($("input[name=forum_id]").val($("#select_child_forum").val()),
            $("#moderator_form").submit())
        })
    },
    _posts_post_list_page: function() {
        $("input[name=select_all]").change(function() {
            $(this).is(":checked") ? $("input[name^=ids]").prop("checked", !0) : $("input[name^=ids]").prop("checked", !1)
        }),
        $("a.delete_submit").click(function(t) {
            t.preventDefault(),
            0 === $("input[name^=ids]:checked").length ? alert("请选择要删除的帖子") : $("#batch_form").attr("action", $(this).attr("href")).submit()
        })
    },
    posts_batch_delete_edit_page: function() {
        $('input[name="reason_type"]').click(function() {
            0 === this.value ? $("#reason").addClass("required") : $("#reason").removeClass("required").removeClass("validation-failed").tooltipStop()
        }),
        $("form.publish").validate()
    },
    posts_search_page: function() {
        $("#search_parent_forum").click(function(t) {
            t.preventDefault(),
            "" !== $("#select_parent_forum").val() ? ($("input[name=forum_id]").val($("#select_parent_forum").val()),
            $("#moderator_search_form").submit()) : alert("请选择大版块")
        }),
        $("#search_child_forum").click(function(t) {
            t.preventDefault(),
            "" !== $("#select_child_forum").val() ? ($("input[name=forum_id]").val($("#select_child_forum").val()),
            $("#moderator_search_form").submit()) : alert("请选择小版块")
        }),
        $("input[name=point]").change(function() {
            $("input[name=point_min], input[name=point_max]").prop("disabled", !$(this).is(":checked"))
        })
    },
    posts_search_pointed: function() {
        $("#search_parent_forum").click(function(t) {
            t.preventDefault(),
            "" !== $("#select_parent_forum").val() ? ($("input[name=forum_id]").val($("#select_parent_forum").val()),
            $("#moderator_search_form").submit()) : alert("请选择大版块")
        }),
        $("#search_child_forum").click(function(t) {
            t.preventDefault(),
            "" !== $("#select_child_forum").val() ? ($("input[name=forum_id]").val($("#select_child_forum").val()),
            $("#moderator_search_form").submit()) : alert("请选择小版块")
        }),
        $("input[name=point]").change(function() {
            $("input[name=point_min], input[name=point_max]").prop("disabled", !$(this).is(":checked"))
        })
    },
    prisoners_new_page: function() {
        $("#search_parent_forum").click(function(t) {
            t.preventDefault(),
            "" !== $("#select_parent_forum").val() ? $("#select_parent_forum :selected").data("moderator") ? ($("input[name=forum_id]").val($("#select_parent_forum").val()),
            $("#new_prisoner_form").submit()) : alert("没有该版管理权限") : alert("请选择大版块")
        }),
        $("#search_child_forum").click(function(t) {
            t.preventDefault(),
            "" !== $("#select_child_forum").val() ? $("#select_child_forum :selected").data("moderator") ? ($("input[name=forum_id]").val($("#select_child_forum").val()),
            $("#new_prisoner_form").submit()) : alert("没有该版管理权限") : alert("请选择小版块")
        }),
        $('input[name="reason_type"]').click(function() {
            0 === this.value ? $("#reason").addClass("required") : $("#reason").removeClass("required").removeClass("validation-failed").tooltipStop()
        }),
        $("#new_prisoner_form").validate(),
        $("a.release").click(function(t) {
            t.preventDefault();
            var e = $(this).siblings("input").val();
            "" !== e ? $.ajax($(this).prop("href"), {
                type: "DELETE",
                dataType: "script",
                data: {
                    note: e
                }
            }) : alert("请填写理由")
        })
    },
    prisoners_search_page: function() {
        $("#search_parent_forum").click(function(t) {
            t.preventDefault(),
            "" !== $("#select_parent_forum").val() ? ($("input[name=forum_id]").val($("#select_parent_forum").val()),
            $("#moderator_search_form").submit()) : alert("请选择大版块")
        }),
        $("#search_child_forum").click(function(t) {
            t.preventDefault(),
            "" !== $("#select_child_forum").val() ? ($("input[name=forum_id]").val($("#select_child_forum").val()),
            $("#moderator_search_form").submit()) : alert("请选择小版块")
        })
    },
    _moderator_select_forum_page: function() {
        var t = $.map(forum_tree, function(t) {
            return t
        });
        $("#select_parent_forum").html($("#selectForumTemplate").tmpl({
            notice: "-选择大版块-",
            forums: t
        })),
        $("#select_parent_forum").change(function() {
            var t = forum_tree[$(this).val()] ? forum_tree[$(this).val()].child_forums : [];
            $("#select_child_forum").html($("#selectForumTemplate").tmpl({
                notice: "-选择小版块-",
                forums: t
            }))
        })
    },
    _select_forum_page: function() {
        var t = $.map(forum_tree, function(t) {
            return t
        });
        $("#select_parent_forum").html($("#selectForumTemplate").tmpl({
            notice: "-选择大版块-",
            forums: t
        })),
        $("#select_parent_forum").change(function() {
            var t = forum_tree[$(this).val()] ? forum_tree[$(this).val()].child_forums : [];
            $("#select_child_forum").html($("#selectForumTemplate").tmpl({
                notice: "-选择小版块-",
                forums: t
            }))
        })
    },
    _topic_list_page: function() {
        $("input[name=select_all]").change(function() {
            $(this).is(":checked") ? $("input[name^=ids]").prop("checked", !0) : $("input[name^=ids]").prop("checked", !1)
        }),
        $("a.delete_submit").click(function(t) {
            t.preventDefault(),
            0 === $("input[name^=ids]:checked").length ? alert("请选择要删除的帖子") : $("#batch_form").attr("action", $(this).attr("href")).submit()
        }),
        $("#search_user .btn_1").click(function(t) {
            t.preventDefault(),
            $("#search_user").attr("action", $(this).attr("href")).submit()
        })
    }
};
$.validator.setDefaults({
    errorPlacement: function(t, e) {
        $(e).tooltip({
            text: t
        }).removeClass("validation-passed").addClass("validation-failed")
    },
    success: function(t, e) {
        $(e).tooltipStop().addClass("validation-passed").removeClass("validation-failed")
    }
});

 左侧菜单

$(function() {
    var menu = new CSDN.Menu({
        forumNodes: [{
            "name": "\u79fb\u52a8\u5f00\u53d1",
            "url": "/forums/Mobile",
            "children": [{
                "name": "iOS",
                "url": "/forums/ios"
            },
            {
                "name": "Android",
                "url": "/forums/Android"
            },
            {
                "name": "Swift",
                "url": "/forums/swift"
            },
            {
                "name": "Windows\u5ba2\u6237\u7aef\u5f00\u53d1",
                "url": "/forums/WindowsMobile"
            },
            {
                "name": "Symbian",
                "url": "/forums/Symbian"
            },
            {
                "name": "BlackBerry",
                "url": "/forums/BlackBerry"
            },
            {
                "name": "Qt",
                "url": "/forums/Qt"
            },
            {
                "name": "\u5fae\u4fe1\u652f\u4ed8",
                "url": "/forums/wechatpay"
            },
            {
                "name": "\u79fb\u52a8\u5e7f\u544a",
                "url": "/forums/MobileAD"
            },
            {
                "name": "\u5fae\u4fe1\u5f00\u53d1",
                "url": "/forums/weixin"
            },
            {
                "name": "\u79fb\u52a8\u5f00\u53d1\u5176\u4ed6\u95ee\u9898",
                "url": "/forums/Mobile_Other"
            },
            {
                "name": "\u975e\u6280\u672f\u533a",
                "url": "/forums/MobileNonTechnical"
            },
            {
                "name": "\u8054\u901aWO+\u5f00\u653e\u5e73\u53f0",
                "url": "/forums/chinaunicom"
            }]
        },
        {
            "name": "\u4e91\u8ba1\u7b97",
            "url": "/forums/CloudComputing",
            "children": [{
                "name": "PaaS/SaaS",
                "children": [{
                    "name": "Cloud Foundry",
                    "url": "/forums/CloudFoundry"
                },
                {
                    "name": "GAE",
                    "url": "/forums/GAE"
                }]
            },
            {
                "name": "\u6570\u636e\u4e2d\u5fc3\u8fd0\u7ef4",
                "children": [{
                    "name": "\u670d\u52a1\u5668",
                    "url": "/forums/server"
                },
                {
                    "name": "\u7f51\u7edc",
                    "url": "/forums/network"
                },
                {
                    "name": "\u865a\u62df\u5316",
                    "url": "/forums/virtual"
                }]
            },
            {
                "name": "AWS",
                "url": "/forums/AWS"
            },
            {
                "name": "\u534e\u4e3a\u4e91\u8ba1\u7b97",
                "url": "/forums/fusioncloud"
            },
            {
                "name": "\u4e91\u5b89\u5168",
                "url": "/forums/ST_Security"
            },
            {
                "name": "\u5206\u5e03\u5f0f\u8ba1\u7b97/Hadoop",
                "url": "/forums/hadoop"
            },
            {
                "name": "\u4e91\u5b58\u50a8",
                "url": "/forums/CloudStorage"
            },
            {
                "name": "Docker",
                "url": "/forums/docker"
            },
            {
                "name": "Spark",
                "url": "/forums/spark"
            },
            {
                "name": "\u6570\u5b57\u5316\u4f01\u4e1a\u4e91\u5e73\u53f0",
                "url": "/forums/DE"
            }]
        },
        {
            "name": "\u533a\u5757\u94fe",
            "url": "/forums/ParentBlockchainTechnology",
            "children": [{
                "name": "\u533a\u5757\u94fe\u6280\u672f",
                "url": "/forums/BlockchainTechnology"
            },
            {
                "name": "\u706b\u661f\u8d22\u7ecf",
                "url": "/forums/huoxing"
            }]
        },
        {
            "name": "\u4f01\u4e1aIT",
            "url": "/forums/Enterprise",
            "children": [{
                "name": "\u4e2d\u95f4\u4ef6",
                "children": [{
                    "name": "\u4e2d\u95f4\u4ef6",
                    "url": "/forums/Middleware"
                }]
            },
            {
                "name": "\u4f01\u4e1a\u7ba1\u7406\u8f6f\u4ef6",
                "children": [{
                    "name": "\u6d88\u606f\u534f\u4f5c",
                    "url": "/forums/ExchangeServer"
                },
                {
                    "name": "SharePoint",
                    "url": "/forums/SharePoint"
                }]
            },
            {
                "name": "Atlassian\u6280\u672f\u8bba\u575b",
                "url": "/forums/atlassian"
            },
            {
                "name": "JetBrains\u6280\u672f\u8bba\u575b",
                "url": "/forums/JetBrains"
            },
            {
                "name": "\u5730\u7406\u4fe1\u606f\u7cfb\u7edf",
                "url": "/forums/GIS"
            },
            {
                "name": "\u4f01\u4e1a\u4fe1\u606f\u5316",
                "url": "/forums/Enterprise_Information"
            },
            {
                "name": "ERP/CRM",
                "url": "/forums/ERP"
            },
            {
                "name": "\u5176\u4ed6",
                "url": "/forums/Enterprise_Other"
            },
            {
                "name": "Xamarin\u6280\u672f",
                "url": "/forums/Xamarin"
            },
            {
                "name": "Enterprise Architect\u6280\u672f\u8bba\u575b",
                "url": "/forums/EA"
            }]
        },
        {
            "name": "\u804c\u573a\u733f\u533a",
            "url": "/forums/CAREER"
        },
        {
            "name": ".NET\u6280\u672f",
            "url": "/forums/DotNET",
            "children": [{
                "name": "C#",
                "url": "/forums/CSharp"
            },
            {
                "name": "ASP.NET",
                "url": "/forums/ASPDotNET"
            },
            {
                "name": ".NET Framework",
                "url": "/forums/DotNETFramework"
            },
            {
                "name": "Web Services",
                "url": "/forums/DotNETWebServices"
            },
            {
                "name": "VB.NET",
                "url": "/forums/VBDotNET"
            },
            {
                "name": "VC.NET",
                "url": "/forums/VCDotNet"
            },
            {
                "name": "\u56fe\u8868\u533a",
                "url": "/forums/DotNETReport"
            },
            {
                "name": ".NET\u6280\u672f\u524d\u77bb",
                "url": "/forums/DotNET_NewTech"
            },
            {
                "name": ".NET\u5206\u6790\u4e0e\u8bbe\u8ba1",
                "url": "/forums/DotNETAnalysisAndDesign"
            },
            {
                "name": "\u7ec4\u4ef6/\u63a7\u4ef6\u5f00\u53d1",
                "url": "/forums/DotNET_Controls"
            },
            {
                "name": "LINQ",
                "url": "/forums/LINQ"
            },
            {
                "name": "\u5176\u4ed6",
                "url": "/forums/DotNET_Other"
            },
            {
                "name": "\u975e\u6280\u672f\u533a",
                "url": "/forums/DotNETNonTechnical"
            }]
        },
        {
            "name": "Java \u6280\u672f",
            "url": "/forums/Java",
            "children": [{
                "name": "Java SE",
                "url": "/forums/J2SE"
            },
            {
                "name": "J2ME",
                "url": "/forums/J2ME"
            },
            {
                "name": "Java Web \u5f00\u53d1",
                "url": "/forums/Java_WebDevelop"
            },
            {
                "name": "Java EE",
                "url": "/forums/J2EE"
            },
            {
                "name": "Eclipse",
                "url": "/forums/Eclipse"
            },
            {
                "name": "Java\u5176\u4ed6\u76f8\u5173",
                "url": "/forums/JavaOther"
            },
            {
                "name": "\u975e\u6280\u672f\u533a",
                "url": "/forums/JavaNonTechnical"
            }]
        },
        {
            "name": "Web \u5f00\u53d1",
            "url": "/forums/WebDevelop",
            "children": [{
                "name": "ASP",
                "url": "/forums/ASP"
            },
            {
                "name": "JSP",
                "url": "/forums/Java_WebDevelop"
            },
            {
                "name": "PHP",
                "url": "/forums/PHP",
                "children": [{
                    "name": "\u5f00\u6e90\u8d44\u6e90",
                    "url": "/forums/PHPOpenSource"
                },
                {
                    "name": "\u57fa\u7840\u7f16\u7a0b",
                    "url": "/forums/PHPBase"
                },
                {
                    "name": "Framework",
                    "url": "/forums/PHPFramework"
                }]
            },
            {
                "name": "JavaScript",
                "url": "/forums/JavaScript"
            },
            {
                "name": "Ajax \u6280\u672f",
                "url": "/forums/Ajax"
            },
            {
                "name": "VBScript",
                "url": "/forums/vbScript"
            },
            {
                "name": "CGI",
                "url": "/forums/CGI"
            },
            {
                "name": "XML/XSL",
                "url": "/forums/XMLSOAP"
            },
            {
                "name": "IIS",
                "url": "/forums/IIS"
            },
            {
                "name": "Apache",
                "url": "/forums/Apache"
            },
            {
                "name": "HTML(CSS)",
                "url": "/forums/HTMLCSS"
            },
            {
                "name": "ColdFusion",
                "url": "/forums/ColdFusion"
            },
            {
                "name": "Ruby/Rails",
                "url": "/forums/ROR"
            },
            {
                "name": "\u8de8\u6d4f\u89c8\u5668\u5f00\u53d1",
                "url": "/forums/CrossBrowser"
            },
            {
                "name": "\u5176\u4ed6",
                "url": "/forums/WebDevelop_Other"
            },
            {
                "name": "\u975e\u6280\u672f\u533a",
                "url": "/forums/WebNonTechnical"
            },
            {
                "name": "HTML5",
                "url": "/forums/HTML5"
            }]
        },
        {
            "name": "\u5f00\u53d1\u8bed\u8a00/\u6846\u67b6",
            "children": [{
                "name": "VC/MFC",
                "url": "/forums/VC",
                "children": [{
                    "name": "\u57fa\u7840\u7c7b",
                    "url": "/forums/VC_Basic"
                },
                {
                    "name": "\u754c\u9762",
                    "url": "/forums/VC_UI"
                },
                {
                    "name": "\u7f51\u7edc\u7f16\u7a0b",
                    "url": "/forums/VC_Network"
                },
                {
                    "name": "\u8fdb\u7a0b/\u7ebf\u7a0b/DLL",
                    "url": "/forums/VC_Process"
                },
                {
                    "name": "ATL/ActiveX/COM",
                    "url": "/forums/VC_ActiveX"
                },
                {
                    "name": "\u6570\u636e\u5e93",
                    "url": "/forums/VC_Database"
                },
                {
                    "name": "\u786c\u4ef6/\u7cfb\u7edf",
                    "url": "/forums/VC_Hardware"
                },
                {
                    "name": "HTML/XML",
                    "url": "/forums/VC_HTML"
                },
                {
                    "name": "\u56fe\u5f62\u5904\u7406/\u7b97\u6cd5",
                    "url": "/forums/VC_ImageProcessing"
                },
                {
                    "name": "\u8d44\u6e90",
                    "url": "/forums/VCResources"
                },
                {
                    "name": "\u975e\u6280\u672f\u7c7b",
                    "url": "/forums/VC_NonTechnical"
                }]
            },
            {
                "name": "VB",
                "url": "/forums/VB",
                "children": [{
                    "name": "\u57fa\u7840\u7c7b",
                    "url": "/forums/VB_Basic"
                },
                {
                    "name": "\u975e\u6280\u672f\u7c7b",
                    "url": "/forums/VB_NonTechnical"
                },
                {
                    "name": "\u63a7\u4ef6",
                    "url": "/forums/VB_Controls"
                },
                {
                    "name": "API",
                    "url": "/forums/VB_API"
                },
                {
                    "name": "\u6570\u636e\u5e93(\u5305\u542b\u6253\u5370\uff0c\u5b89\u88c5\uff0c\u62a5\u8868)",
                    "url": "/forums/VB_Database"
                },
                {
                    "name": "\u591a\u5a92\u4f53",
                    "url": "/forums/VB_Multimedia"
                },
                {
                    "name": "\u7f51\u7edc\u7f16\u7a0b",
                    "url": "/forums/VB_Network"
                },
                {
                    "name": "VBA",
                    "url": "/forums/VBA"
                },
                {
                    "name": "COM/DCOM/COM+",
                    "url": "/forums/VB_COM"
                },
                {
                    "name": "\u8d44\u6e90",
                    "url": "/forums/VBResources"
                }]
            },
            {
                "name": "Delphi",
                "url": "/forums/Delphi",
                "children": [{
                    "name": "VCL\u7ec4\u4ef6\u5f00\u53d1\u53ca\u5e94\u7528",
                    "url": "/forums/DelphiVCL"
                },
                {
                    "name": "\u6570\u636e\u5e93\u76f8\u5173",
                    "url": "/forums/DelphiDB"
                },
                {
                    "name": "Windows SDK/API",
                    "url": "/forums/DelphiAPI"
                },
                {
                    "name": "\u7f51\u7edc\u901a\u4fe1/\u5206\u5e03\u5f0f\u5f00\u53d1",
                    "url": "/forums/DelphiNetwork"
                },
                {
                    "name": "\u8bed\u8a00\u57fa\u7840/\u7b97\u6cd5/\u7cfb\u7edf\u8bbe\u8ba1",
                    "url": "/forums/DelphiBase"
                },
                {
                    "name": "GAME\uff0c\u56fe\u5f62\u5904\u7406/\u591a\u5a92\u4f53",
                    "url": "/forums/DelphiMultimedia"
                },
                {
                    "name": "\u975e\u6280\u672f\u533a",
                    "url": "/forums/DelphiNonTechnical"
                }]
            },
            {
                "name": "C++ Builder",
                "url": "/forums/BCB",
                "children": [{
                    "name": "\u57fa\u7840\u7c7b",
                    "url": "/forums/BCBBase"
                },
                {
                    "name": "\u6570\u636e\u5e93\u53ca\u76f8\u5173\u6280\u672f",
                    "url": "/forums/BCBDB"
                },
                {
                    "name": "VCL\u7ec4\u4ef6\u4f7f\u7528\u548c\u5f00\u53d1",
                    "url": "/forums/BCBVCL"
                },
                {
                    "name": "Windows SDK/API",
                    "url": "/forums/BCBAPI"
                },
                {
                    "name": "\u7f51\u7edc\u53ca\u901a\u8baf\u5f00\u53d1",
                    "url": "/forums/BCBNetwork"
                },
                {
                    "name": "ActiveX/COM/DCOM",
                    "url": "/forums/BCBCOM"
                },
                {
                    "name": "\u8336\u9986",
                    "url": "/forums/BCBTeaHouses"
                }]
            },
            {
                "name": "C/C++",
                "url": "/forums/Cpp",
                "children": [{
                    "name": "\u65b0\u624b\u4e50\u56ed",
                    "url": "/forums/Cpp_Freshman"
                },
                {
                    "name": "C\u8bed\u8a00",
                    "url": "/forums/C"
                },
                {
                    "name": "C++ \u8bed\u8a00",
                    "url": "/forums/CPPLanguage"
                },
                {
                    "name": "\u5de5\u5177\u5e73\u53f0\u548c\u7a0b\u5e8f\u5e93",
                    "url": "/forums/Cpp_ToolsPlatform"
                },
                {
                    "name": "\u6a21\u5f0f\u53ca\u5b9e\u73b0",
                    "url": "/forums/Cpp_Model"
                },
                {
                    "name": "\u5176\u4ed6\u6280\u672f\u95ee\u9898",
                    "url": "/forums/Cpp_Other"
                },
                {
                    "name": "\u975e\u6280\u672f\u533a",
                    "url": "/forums/Cpp_NonTechnical"
                }]
            },
            {
                "name": "\u5176\u4ed6\u5f00\u53d1\u8bed\u8a00",
                "url": "/forums/OtherLanguage",
                "children": [{
                    "name": "OpenCL\u548c\u5f02\u6784\u7f16\u7a0b",
                    "url": "/forums/Heterogeneous"
                },
                {
                    "name": "Go\u8bed\u8a00",
                    "url": "/forums/golang"
                },
                {
                    "name": "\u6c47\u7f16\u8bed\u8a00",
                    "url": "/forums/ASM"
                },
                {
                    "name": "\u811a\u672c\u8bed\u8a00\uff08Perl/Python\uff09",
                    "url": "/forums/OL_Script"
                },
                {
                    "name": "\u5176\u4ed6\u5f00\u53d1\u8bed\u8a00",
                    "url": "/forums/OtherLanguage_Other"
                }]
            }]
        },
        {
            "name": "\u6570\u636e\u5e93\u5f00\u53d1",
            "url": null,
            "children": [{
                "name": "\u5927\u6570\u636e",
                "children": [{
                    "name": "Hadoop",
                    "url": "/forums/hadoop"
                }]
            },
            {
                "name": "MS-SQL Server",
                "url": "/forums/MSSQL",
                "children": [{
                    "name": "\u57fa\u7840\u7c7b",
                    "url": "/forums/MSSQL_Basic"
                },
                {
                    "name": "\u5e94\u7528\u5b9e\u4f8b",
                    "url": "/forums/MSSQL_Cases"
                },
                {
                    "name": "\u7591\u96be\u95ee\u9898",
                    "url": "/forums/MSSQL_DifficultProblems"
                },
                {
                    "name": "\u65b0\u6280\u672f\u524d\u6cbf",
                    "url": "/forums/MSSQL_NewTech"
                },
                {
                    "name": "\u975e\u6280\u672f\u7248",
                    "url": "/forums/MSSQL_NonTechnical"
                }]
            },
            {
                "name": "PowerBuilder",
                "url": "/forums/PowerBuilder",
                "children": [{
                    "name": "\u57fa\u7840\u7c7b",
                    "url": "/forums/PB_Basic"
                },
                {
                    "name": "Pb\u811a\u672c\u8bed\u8a00",
                    "url": "/forums/PBScript"
                },
                {
                    "name": "DataWindow",
                    "url": "/forums/PB_DataWindow"
                },
                {
                    "name": "API \u8c03\u7528",
                    "url": "/forums/PB_API"
                },
                {
                    "name": "\u63a7\u4ef6\u4e0e\u754c\u9762",
                    "url": "/forums/PB_Controls"
                },
                {
                    "name": "Pb Web \u5e94\u7528",
                    "url": "/forums/PB_WEB"
                },
                {
                    "name": "\u6570\u636e\u5e93\u76f8\u5173",
                    "url": "/forums/PB_Database"
                },
                {
                    "name": "\u9879\u76ee\u7ba1\u7406",
                    "url": "/forums/PB_ProjectManagement"
                },
                {
                    "name": "\u975e\u6280\u672f\u7248",
                    "url": "/forums/PB_NonTechnical"
                }]
            },
            {
                "name": "Oracle",
                "url": "/forums/Oracle",
                "children": [{
                    "name": "\u57fa\u7840\u548c\u7ba1\u7406",
                    "url": "/forums/Oracle_Management"
                },
                {
                    "name": "\u5f00\u53d1",
                    "url": "/forums/Oracle_Develop"
                },
                {
                    "name": "\u9ad8\u7ea7\u6280\u672f",
                    "url": "/forums/Oracle_Technology"
                },
                {
                    "name": "\u8ba4\u8bc1\u4e0e\u8003\u8bd5",
                    "url": "/forums/Oracle_Certificate"
                },
                {
                    "name": "\u975e\u6280\u672f\u533a",
                    "url": "/forums/Oracle_NonTechnical"
                }]
            },
            {
                "name": "Informatica",
                "url": "/forums/Informatica"
            },
            {
                "name": "\u5176\u4ed6\u6570\u636e\u5e93\u5f00\u53d1",
                "url": "/forums/OtherDatabase",
                "children": [{
                    "name": "MongoDB",
                    "url": "/forums/MongoDB"
                },
                {
                    "name": "\u6570\u636e\u4ed3\u5e93",
                    "url": "/forums/DataWarehouse"
                },
                {
                    "name": "VFP",
                    "url": "/forums/VFP"
                },
                {
                    "name": "Access",
                    "url": "/forums/Access"
                },
                {
                    "name": "Sybase",
                    "url": "/forums/Sybase"
                },
                {
                    "name": "Informix",
                    "url": "/forums/Informix"
                },
                {
                    "name": "MySQL",
                    "url": "/forums/MySQL"
                },
                {
                    "name": "PostgreSQL",
                    "url": "/forums/PostgreSQL"
                },
                {
                    "name": "Greenplum",
                    "url": "/forums/Greenplum"
                },
                {
                    "name": "\u6570\u636e\u5e93\u62a5\u8868",
                    "url": "/forums/DatabaseReport"
                },
                {
                    "name": "\u5176\u4ed6\u6570\u636e\u5e93",
                    "url": "/forums/OtherDatabase_Other"
                },
                {
                    "name": "\u9ad8\u6027\u80fd\u6570\u636e\u5e93\u5f00\u53d1",
                    "url": "/forums/HPDatabase"
                },
                {
                    "name": "\u975e\u6280\u672f\u533a",
                    "url": "/forums/DatabaseNonTechnical"
                }]
            }]
        },
        {
            "name": "Linux/Unix\u793e\u533a",
            "url": "/forums/Linux",
            "children": [{
                "name": "\u7cfb\u7edf\u7ef4\u62a4\u4e0e\u4f7f\u7528\u533a",
                "url": "/forums/Linux_System"
            },
            {
                "name": "\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u533a",
                "url": "/forums/Linux_Development"
            },
            {
                "name": "\u5185\u6838\u6e90\u4ee3\u7801\u7814\u7a76\u533a",
                "url": "/forums/Linux_Kernel"
            },
            {
                "name": "\u9a71\u52a8\u7a0b\u5e8f\u5f00\u53d1\u533a",
                "url": "/forums/Linux_Driver"
            },
            {
                "name": "CPU\u548c\u786c\u4ef6\u533a",
                "url": "/forums/Linux_Hardware"
            },
            {
                "name": "\u4e13\u9898\u6280\u672f\u8ba8\u8bba\u533a",
                "url": "/forums/Linux_SpecialTopic"
            },
            {
                "name": "\u5b9e\u7528\u8d44\u6599\u53d1\u5e03\u533a",
                "url": "/forums/Linux_Information"
            },
            {
                "name": "UNIX\u6587\u5316",
                "url": "/forums/Unix_Culture"
            },
            {
                "name": "Solaris",
                "url": "/forums/Solaris"
            },
            {
                "name": "IBM AIX",
                "url": "/forums/AIX"
            },
            {
                "name": "Power Linux",
                "url": "/forums/PowerLinux"
            },
            {
                "name": "\u975e\u6280\u672f\u533a",
                "url": "/forums/LinuxNonTechnical"
            }]
        },
        {
            "name": "Windows\u4e13\u533a",
            "url": "/forums/Windows",
            "children": [{
                "name": "Windows\u5ba2\u6237\u7aef\u4f7f\u7528",
                "url": "/forums/Windows7"
            },
            {
                "name": "Windows Server",
                "url": "/forums/WinNT2000XP2003"
            },
            {
                "name": "\u7f51\u7edc\u7ba1\u7406\u4e0e\u914d\u7f6e",
                "url": "/forums/NetworkConfiguration"
            },
            {
                "name": "\u5b89\u5168\u6280\u672f/\u75c5\u6bd2",
                "url": "/forums/WindowsSecurity"
            },
            {
                "name": "\u4e00\u822c\u8f6f\u4ef6\u4f7f\u7528",
                "url": "/forums/WindowsBase"
            },
            {
                "name": "Microsoft Office\u5e94\u7528",
                "url": "/forums/OfficeBase"
            },
            {
                "name": "\u975e\u6280\u672f\u533a",
                "url": "/forums/WindowsNonTechnical"
            }]
        },
        {
            "name": "\u786c\u4ef6/\u5d4c\u5165\u5f00\u53d1",
            "url": "/forums/Embedded",
            "children": [{
                "name": "\u786c\u4ef6\u4f7f\u7528",
                "url": "/forums/HardwareUse"
            },
            {
                "name": "\u5d4c\u5165\u5f00\u53d1(WinCE)",
                "url": "/forums/WinCE"
            },
            {
                "name": "\u786c\u4ef6\u8bbe\u8ba1",
                "url": "/forums/Embedded_hardware"
            },
            {
                "name": "\u9a71\u52a8\u5f00\u53d1/\u6838\u5fc3\u5f00\u53d1",
                "url": "/forums/Embedded_driver"
            },
            {
                "name": "\u5355\u7247\u673a/\u5de5\u63a7",
                "url": "/forums/Embedded_SCM"
            },
            {
                "name": "\u65e0\u7ebf",
                "url": "/forums/Embedded_wireless"
            },
            {
                "name": "\u5176\u4ed6\u786c\u4ef6\u5f00\u53d1",
                "url": "/forums/Embedded_Other"
            },
            {
                "name": "VxWorks\u5f00\u53d1",
                "url": "/forums/VxWorks"
            },
            {
                "name": "\u975e\u6280\u672f\u533a",
                "url": "/forums/EmbeddedNonTechnical"
            },
            {
                "name": "\u667a\u80fd\u786c\u4ef6",
                "url": "/forums/SmartHardware"
            }]
        },
        {
            "name": "\u6e38\u620f\u5f00\u53d1",
            "url": "/forums/GameDevelop",
            "children": [{
                "name": "Cocos2d-x",
                "url": "/forums/GD_Cocos2d-x"
            },
            {
                "name": "Unity3D",
                "url": "/forums/GD_Unity3D"
            },
            {
                "name": "\u5176\u4ed6\u6e38\u620f\u5f15\u64ce",
                "url": "/forums/Othergameengines"
            },
            {
                "name": "\u6e38\u620f\u7b56\u5212\u4e0e\u8fd0\u8425",
                "url": "/forums/Gdesignoperation"
            }]
        },
        {
            "name": "\u7f51\u7edc\u4e0e\u901a\u4fe1",
            "url": "/forums/Network_communication",
            "children": [{
                "name": "\u7f51\u7edc\u534f\u8bae\u4e0e\u914d\u7f6e",
                "url": "/forums/IP_Protocolconfiguration"
            },
            {
                "name": "\u7f51\u7edc\u7ef4\u62a4\u4e0e\u7ba1\u7406",
                "url": "/forums/maintainmanage"
            },
            {
                "name": "\u4ea4\u6362\u53ca\u8def\u7531\u6280\u672f",
                "url": "/forums/Hardware_SwitchRouter"
            },
            {
                "name": "CDN",
                "url": "/forums/NetworkC_CDN"
            },
            {
                "name": "\u901a\u4fe1\u6280\u672f",
                "url": "/forums/ST_Network"
            },
            {
                "name": "VOIP\u6280\u672f\u63a2\u8ba8",
                "url": "/forums/voip"
            },
            {
                "name": "\u667a\u80fd\u8def\u7531\u5668",
                "url": "/forums/IR"
            }]
        },
        {
            "name": "\u6269\u5145\u8bdd\u9898",
            "url": "/forums/Other",
            "children": [{
                "name": "\u6d3b\u52a8\u798f\u5229\u4e13\u533a",
                "url": "/forums/Activity"
            },
            {
                "name": "P2P\u7406\u8d22",
                "url": "/forums/p2p"
            },
            {
                "name": "\u56fe\u4e66\u6c47\u603b",
                "url": "/forums/Book"
            },
            {
                "name": "\u7a0b\u5e8f\u4eba\u751f",
                "url": "/forums/ProgrammerStory"
            },
            {
                "name": "IT\u7f18\u5206",
                "url": "/forums/ITFate"
            },
            {
                "name": "\u704c\u6c34\u4e50\u56ed",
                "url": "/forums/FreeZone"
            },
            {
                "name": "\u5927\u5b66\u65f6\u4ee3",
                "url": "/forums/CollegeTime"
            },
            {
                "name": "\u8d70\uff0c\u6253\u602a\u53bb",
                "url": "/forums/Game"
            },
            {
                "name": "\u9996\u90fd\u7f51\u8b66",
                "url": "/forums/sdwj"
            }]
        },
        {
            "name": "Qualcomm\u5f00\u53d1\u8bba\u575b",
            "children": [{
                "name": "Qualcomm\u5f00\u53d1",
                "url": "/forums/qualcomm"
            }]
        },
        {
            "name": "\u4f01\u4e1a\u6280\u672f",
            "children": [{
                "name": "IBM \u6280\u672f\u793e\u533a",
                "children": [{
                    "name": "WebSphere",
                    "url": "/forums/WebSphere"
                },
                {
                    "name": "DB2",
                    "url": "/forums/DB2"
                },
                {
                    "name": "IBM\u4e91\u8ba1\u7b97",
                    "url": "/forums/ibmcloud"
                },
                {
                    "name": "IBM\u5f00\u53d1\u8005",
                    "url": "/forums/IBMDeveloper"
                },
                {
                    "name": "IBM AIX",
                    "url": "/forums/AIX"
                },
                {
                    "name": "Power Linux",
                    "url": "/forums/PowerLinux"
                }]
            },
            {
                "name": "\u82f1\u7279\u5c14\u8f6f\u4ef6\u5f00\u53d1\u793e\u533a",
                "children": [{
                    "name": "\u82f1\u7279\u5c14\u6280\u672f",
                    "url": "/forums/intel"
                }]
            },
            {
                "name": "Paypal\u5f00\u53d1\u8005\u793e\u533a",
                "url": "/forums/PaypalCommunity"
            },
            {
                "name": "Google\u6280\u672f\u793e\u533a",
                "children": [{
                    "name": "Android",
                    "url": "/forums/Android"
                },
                {
                    "name": "GDG",
                    "url": "/forums/GDG"
                }]
            },
            {
                "name": "Microsoft Office \u5e94\u7528\u4e8e\u5f00\u53d1",
                "children": [{
                    "name": "Office\u5f00\u53d1",
                    "url": "/forums/OfficeDevelopment"
                },
                {
                    "name": "Office\u4f7f\u7528",
                    "url": "/forums/OfficeBase"
                }]
            }]
        },
        {
            "name": "\u5176\u4ed6\u6280\u672f\u8bba\u575b",
            "url": "/forums/OtherTechnicalForum",
            "children": [{
                "name": "Qualcomm\u5f00\u53d1",
                "url": "/forums/qualcomm"
            },
            {
                "name": "\u8f6f\u4ef6\u6d4b\u8bd5",
                "url": "/forums/SE_Quality"
            },
            {
                "name": "\u7814\u53d1\u7ba1\u7406",
                "url": "/forums/SE_Management"
            },
            {
                "name": "\u654f\u6377\u5f00\u53d1",
                "url": "/forums/Agile"
            },
            {
                "name": "\u7248\u672c\u63a7\u5236",
                "url": "/forums/CVS_SVN"
            },
            {
                "name": "\u8bbe\u8ba1\u6a21\u5f0f",
                "url": "/forums/DesignPatterns"
            },
            {
                "name": "\u9ad8\u6027\u80fd\u8ba1\u7b97",
                "url": "/forums/HPC"
            },
            {
                "name": "\u9ad8\u6027\u80fdWEB\u5f00\u53d1",
                "url": "/forums/HPWebDevelop"
            },
            {
                "name": "\u9ad8\u6027\u80fd\u6570\u636e\u5e93\u5f00\u53d1",
                "url": "/forums/HPDatabase"
            },
            {
                "name": "\u6d77\u91cf\u6570\u636e\u5904\u7406/\u641c\u7d22\u6280\u672f",
                "url": "/forums/SearchEngine"
            },
            {
                "name": "\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5",
                "url": "/forums/ST_Arithmetic"
            },
            {
                "name": "OpenAPI",
                "url": "/forums/OpenAPI"
            },
            {
                "name": "OpenStack",
                "url": "/forums/OpenStack"
            },
            {
                "name": "\u673a\u5668\u89c6\u89c9",
                "url": "/forums/ST_Image"
            },
            {
                "name": "OpenCV",
                "url": "/forums/OpenCV"
            },
            {
                "name": "\u4fe1\u606f/\u7f51\u7edc\u5b89\u5168",
                "url": "/forums/ST_Security"
            },
            {
                "name": "\u4eba\u5de5\u667a\u80fd\u6280\u672f",
                "url": "/forums/AI"
            },
            {
                "name": "\u8d28\u91cf\u7ba1\u7406/\u8f6f\u4ef6\u6d4b\u8bd5",
                "url": "/forums/SE_Quality"
            },
            {
                "name": "\u591a\u5a92\u4f53/\u6d41\u5a92\u4f53\u5f00\u53d1",
                "url": "/forums/Multimedia"
            },
            {
                "name": "\u56fe\u8c61\u5de5\u5177\u4f7f\u7528",
                "url": "/forums/ImageTools"
            },
            {
                "name": "Flash\u6d41\u5a92\u4f53\u5f00\u53d1",
                "url": "/forums/FlashDevelop"
            },
            {
                "name": "\u4ea4\u4e92\u5f0f\u8bbe\u8ba1",
                "url": "/forums/InteractiveDesign"
            },
            {
                "name": "WPF/Silverlight",
                "url": "/forums/Silverlight"
            },
            {
                "name": "Flex",
                "url": "/forums/Flex"
            },
            {
                "name": "\u6570\u7801\u8bbe\u5907",
                "url": "/forums/Hardware_Digital"
            },
            {
                "name": "\u7535\u8111\u6574\u673a\u53ca\u914d\u4ef6",
                "url": "/forums/Hardware_Computer"
            },
            {
                "name": "\u5916\u8bbe\u53ca\u529e\u516c\u8bbe\u5907",
                "url": "/forums/Hardware_Peripheral"
            },
            {
                "name": "\u88c5\u673a\u4e0e\u5347\u7ea7\u53ca\u5176\u4ed6",
                "url": "/forums/Hardware_DIY"
            },
            {
                "name": "\u975e\u6280\u672f\u533a",
                "url": "/forums/Hardware_NonTechnical"
            },
            {
                "name": "IBM \u5f00\u53d1\u8005",
                "url": "/forums/IBMDeveloper"
            },
            {
                "name": "\u5176\u4ed6",
                "url": "/forums/ADSOther"
            }]
        },
        {
            "name": "\u7ad9\u52a1\u4e13\u533a",
            "url": "/forums/Support",
            "children": [{
                "name": "\u793e\u533a\u516c\u544a",
                "url": "/forums/placard"
            },
            {
                "name": "\u4e0b\u8f7d\u95ee\u9898\u53cd\u9988\u4e13\u533a",
                "url": "/forums/DownloadQuestion"
            },
            {
                "name": "\u535a\u5ba2\u95ee\u9898\u53cd\u9988\u4e13\u533a",
                "url": "/forums/BlogQuestion"
            },
            {
                "name": "\u5ba2\u670d\u4e13\u533a",
                "url": "/forums/Service"
            },
            {
                "name": "\u7248\u4e3b\u4e13\u533a",
                "url": "/forums/Moderator"
            }]
        },
        {
            "name": "GE Predix\u8bba\u575b",
            "url": "/forums/GEPredixDev"
        }],
        isLogined: true,
        isModerator: true,
        favoriteForumUrls: ["/forums/CSharp", "/forums/ASPDotNET", "/forums/30Plus", "/forums/MSSQL", "/forums/FreeZone", "/forums/Oracle", "/forums/Service", "/forums/MySQL", "/forums/BlogQuestion", "/forums/DotNET_NewTech", "/forums/ProgrammerStory", "/forums/JavaScript"],
        lastForumNodes: [{
            "name": "GDG",
            "url": "/forums/GDG"
        },
        {
            "name": "\u667a\u80fd\u8def\u7531\u5668",
            "url": "/forums/IR"
        }]
    });

    menu.render();
    //使用on方法实时监控对应文件夹图标的事件,文件夹图标只有打开和关闭的效果,无页面跳转,无论元素是否是动态生成的on都可以执行
    $(document).on("click", "#menu span[id^=menu_][id$=_switch]",
    function(event) {
        var cookie_item_ids = $.cookie('forum_item_id');
        var item_id = $(this).attr('id');

        if ($(this).hasClass("noline_open")) {
            if (cookie_item_ids != null && cookie_item_ids.indexOf(item_id) < 0) {
                $.cookie('forum_item_id', cookie_item_ids + "," + item_id, {
                    path: '/'
                });
            } else if (cookie_item_ids == null || cookie_item_ids == '') {
                $.cookie('forum_item_id', "," + item_id, {
                    path: '/'
                });
            }
        } else if ($(this).hasClass("noline_close") >= 0) {
            if (cookie_item_ids != null && cookie_item_ids.indexOf(item_id) >= 0) {
                $.cookie('forum_item_id', cookie_item_ids.replace("," + item_id, ""), {
                    path: '/'
                });
            }
        }
    });
    /*$("#menu a[id^=menu_][id$=_a]").on("click", function (event) {
        var switch_wrap = $(this).prev();
        var thisHref = $(this).attr("target","_self");

        switch_wrap.trigger("click");
        event.stopPropagation();
        //event.preventDefault();
    });*/

    // 目录树只加载了一级目录,二级以下的目录都是延迟加载
    var forum_items_ids = $.cookie('forum_item_id');
    if (forum_items_ids != null) {
        var array_itmes = forum_items_ids.split(",");
        for (var i = 0; i < array_itmes.length; i++) {
            if (array_itmes[i] != '') {
                //当底层的文件目录打开,而父层的目录被关闭,页面刷新时,因为延迟加载导致不存在的底层目录无法打开,所以从cookie中删除
                if ($("#" + array_itmes[i]).length > 0) {
                    $("#" + array_itmes[i]).trigger(("click"));
                } else {
                    $.cookie('forum_item_id', forum_items_ids.replace("," + array_itmes[i], ""), {
                        path: '/'
                    });
                }

            }
        }
    }
});

猜你喜欢

转载自blog.csdn.net/yenange/article/details/84668625