";var h=$();if(j==="above_post_signature"){var g=$(t[0]).closest(".b-post__footer");h=g.prevAll(".js-post__content").find(".post-signature");if(h.length===0){h=g.find('[id^="content-tags-"]')}}if(h.length===0){var b=$(t[0].parentElement);h=b.siblings(".b-divider--post-controls");if(h.length===0){h=b}}$(a).insertBefore(h)}}}}})}},"json")};var a=function(){var e=document.querySelectorAll('.b-post-control[id^="vote-"],.b-post-control[id^="votecount-"]');var t=[];[].forEach.call(e,function(e){if(Number(e.querySelector(".votecount").textContent)>0){var r=e.id.replace(/vote(count)*\-/,"");t.push(r)}});if(t.length>0){n(t)}};a();$.ajaxPrefilter(function(r,t){if(r.url.indexOf("/api/reputation/vote")!==-1||r.url.indexOf("/api/reputation/unvote")!==-1){var i=r.success;r.success=function(e){if(e){i.apply(this,arguments);if(!e.errors&&(Number(e.votes)>0||r.url.indexOf("/api/reputation/unvote")!==-1)){n([e.nodeid])}}}}else if(r.url.indexOf("activity/get")!==-1){var i=r.success;r.success=function(e){if(e){i.apply(this,arguments);if(!e.errors){a()}}}}else if(r.url.indexOf("create-content/loadnode")!==-1){var i=r.success;r.success=function(e){if(e){i.apply(this,arguments);if(!e.errors){n([t.data.nodeid])}}}}})})})();
Comment