/*copy*/ $(function(){ var c = document.getelementbyid("bar"); var s=c.innertext; var clipboard = new clipboard('#copied', { text: function() { return s; } }); clipboard.on('success', function(e) { alert("复制成功"); }); clipboard.on('error', function(e) { console.log(e); }); }); function shareto(stype){ var sharelink = document.location.href; var sharetitle = document.title; var lk = ''; //qq空间 if(stype=='qzone'){ window.open('https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+sharelink+'?sharesource=qzone&title='+sharetitle+'&summary='+sharetitle+'&desc='+sharetitle); } //新浪微博 if(stype=='sina'){ window.open('http://service.weibo.com/share/share.php?url='+sharelink+'?sharesource=weibo&title='+sharetitle+'&pic='+lk+'&appkey=2992312571'); } //qq好友 if(stype == 'qq'){ window.open('http://connect.qq.com/widget/shareqq/index.html?url='+sharelink+'?sharesource=qzone&title='+sharetitle); } if(stype == 'wechat'){ $('#sharecode').html(''); $('#sharecodeindex').html(''); $('#sharecode,#sharecodeindex').qrcode( { width: 100, height: 100, text: sharelink } ); $('#sharecode').show(); } if(stype == 'wechatindex'){ $('#sharecodeindex').html(''); $('#sharecodeindex').qrcode( { width: 100, height: 100, text: sharelink } ); $('#sharecodeindex').show(); } $('.article-share-group').mouseover(function () { $('#sharecode').hide(); $('#sharecodeindex').hide(); }); $('.article-share-wechat').mouseover(function () { $('#sharecodeindex').hide(); }); } $(".trs_editor").removeclass("trs_editor");$(".content").add(".content p").add(".content font").add(".content span").add(".content p *").add(".content font *").add(".content span *").each(function(){textindent=$(this).css("text-indent");textalign=$(this).css("text-align");fontweight=$(this).css("font-weight");$(this).removeattr("style");if(textindent.indexof("0")>=0||textindent.indexof("-")>=0){$(this).css({"text-indent":"0em"});}else{$(this).css({"text-indent":"2em"});};$(this).css({"font-size":"","line-height":"30px","font-family":"","text-align":textalign,"font-weight":fontweight});});$(".content b").add(".content strong").add(".content b *").add(".content strong *").each(function(){$(this).css("font-weight","bold")});$(".content font").attr("size","");$(".content table").removeattr("width").attr("cellspacing","0");$(".content td").removeattr("style");$("td *").each(function(){$(this).css("text-indent","0pt")}); $(function(){ $(".content img").each(function(){ $(this).parents("p").css("text-indent","0"); }); });