$(function(){function joinGroup(id,type,cb){var token=GM.utils.cookie("_32353_access_token");$.ajax({url:"../../apis/group/member.json",data:{group_id:id,access_token:token},type:type,success:function(a){a.ok&&cb&&cb()},error:function(data){var json=eval("("+data.responseText+")");241001==json.error_code?alert("该小组不存在"):241016==json.error_code?alert("你不是这个小组的成员"):241017==json.error_code?alert("你是这个小组的管理员，不能退出"):241014==json.error_code&&alert("你在这个小组的黑名单里，不能加入")},dataType:"json"})}GM.vars.GA_TYPE="post";var post_id=window.post_id||"";GM.vars.post_reply_id=post_id;var ac=$("#contentMain"),imgs=ac.find("img"),embeds=ac.find("embed"),iframes=ac.find("iframe"),title=$("h1.title").html();imgs.removeAttr("style"),embeds.replaceWith("<p>（此处视频，暂不支持播放）</p>"),iframes.replaceWith("<p>（此处视频，暂不支持播放）</p>"),$("#loadMoreReply").bind("click",function(){GM.init.loadMoreReply(this)}),GM.init.textFold(),GM.init.cutNames(),GM.init.loadHot();var entry={title:title,url:document.URL.replace("../../../m/","../../../www/"),summary:"这个有意思 ⇒_⇒  【"+title+"】"};imgs.length>0&&(entry.pic=$(imgs[0]).attr("src")),bShare.addEntry(entry),$(".cmt-form").delegate("a[data-operation]","click",function(a){a.preventDefault();var b=$(this),c=b.attr("data-operation"),d=b.attr("data-group_id");"yes"!==b.attr("data-login")||ukey||(window.location.href=url_signin),ukey&&"join"===c&&joinGroup(d,"POST",function(){$(".cmt-form a[data-operation]").remove(),$(".cmt-form form").removeClass("ghide")})});var clicked=!1;$(".form-foot").delegate("button","click",function(a){if(!clicked){a.preventDefault();var b=$(this),c=b.parents("form").find("textarea"),d=c.val();d+='[blockquote]来自[url="../../"]果壳网移动版[/url][/blockquote]',c.val(d),clicked=!0,b.trigger("click")}}),$("#showRestBtn").attr("data-gaevent","mobile_post_all:post"),GM.init.initSpecial()});