\n \n "),$menu=$this.parent().find(".post-menu")}$menu.toggle(on)}}).on("click",".file-menu-toggle",function(ev){ev.stopPropagation(),ev.preventDefault();var $menu=$(".file-menu"),$this=$(this),$fsz=$this.parent(),visible=$menu.is(":visible");if($(".post-menu").hide(),!(visible&&$menu[0].$boundTo[0]==$fsz[0])){var ofs=$fsz.offset(),offsetTop=$fsz.hasClass("embed-wrap")?22:$fsz.outerHeight();$menu.css({left:ofs.left+"px",top:ofs.top+offsetTop+"px","min-width":$fsz.outerWidth()+"px"}).show(),$menu[0].__menuProps={fileid:$fsz.parents("figure").data("fileid"),board:$fsz.parents(".postnode").data("board")},$menu[0].$boundTo=$fsz}}).on("click",".post-menu li",function(ev){return ev.stopPropagation()}).on("click",".menu-select-multiple",function(){$(".post-menu").hide();var $menu=$(this).parents(".post-menu"),isFile=$menu.hasClass("file-menu"),$md=(isFile?$menu[0].$boundTo:$(this).parents(".posthead")).find(".multidel");$md.length&&($md.prop("checked",!0).trigger("change"),$(".userdelete").addClass("ud-active"),$("body").addClass("select-multiple"))}).on("click",".menu-link-share",function(){var $this=$(this),isShown=$this.find("input").length;if(!isShown){var $postnode=$this.parents(".postnode"),board=$postnode.data("board"),id=$postnode.data("id"),directLink=ku_boardspath+$postnode.find(".shl").attr("href");$this.find("span").html(" \n ").css({"font-size":0}).find(".pm-direct-link").click()}else $this.toggleClass("direct-or-quote")}).on("click",".pm-link",function(ev){ev.stopPropagation();var $this=$(this);$(".pm-link").removeClass("selected"),$this.focus().select().addClass("selected")}).on("click",".menu-delete",function(){var $this=$(this),$menu=$this.parents(".post-menu"),menu=$menu[0],isFile=$menu.hasClass("file-menu"),$item=isFile?$menu[0].$boundTo:$this.parents(".posthead");$this.addClass("spin-around");var fd=new FormData;isFile?fd.append("delete-file[]",menu.__menuProps.fileid):fd.append("post[]",$item.parents(".postnode").data("id")),fd.append("moddelete",$this.hasClass("menu-delete-mod")),fd.append("board",isFile?menu.__menuProps.board:$item.parents(".postnode").data("board")),fd.append("postpassword",$("#delform input[name=\"postpassword\"]").val()),Ajax.deleteItems(fd,function(data){if($this.removeClass("spin-around"),!!data){var result=data[0];!result.success&&$item.is(":visible")?($item.find(".multidel").prop("checked",!0).trigger("change"),$(".userdelete").addClass("ud-active"),$("body").addClass("select-multiple")):isFile&&$(".file-menu").hide()}})}).on("click",".menu-report",function(){var $this=$(this),$item=$this.parents(".posthead");$this.addClass("spin-around");var fd=new FormData;fd.append("post[]",$item.find(".reflink a:last").text()),fd.append("board",$item.parents(".postnode").data("board")),Ajax.reportPost(fd,function(){$this.removeClass("spin-around")})}).on("click",".csswrap",function(ev){ev.preventDefault();var cssLink=$(this).attr("href"),styleName=$(this).parent().find(".fc-filename").text();Styles.testStyle(cssLink,styleName)}).on("click",".remove-file",function(ev){ev.preventDefault(),$(this).parent().find("input[type=file]").val(null)}),offClick.push(function(){$(".post-menu").hide()}),$(window).resize(function(){var $fileMenu=$(".file-menu");if($fileMenu.is(":visible")){var $fsz=$fileMenu[0].$boundTo,ofs=$fsz.offset(),offsetTop=$fsz.hasClass("embed-wrap")?22:$fsz.outerHeight();$fileMenu.css({left:ofs.left+"px",top:ofs.top+offsetTop+"px","min-width":$fsz.outerWidth()+"px"})}}),$("#postclone label").each(function(){var id=$(this).attr("for"),newid=id+"_clone";$(this).parents("form").find("#"+id).attr("id",newid),$(this).attr("for",newid)}),$("#postform textarea").attr("id","top-textarea"),$("#postform .uib-tx").data("target","top-textarea"),$("#postclone textarea").attr("id","pop-textarea"),$("#postclone .uib-tx").data("target","pop-textarea"),!isTouch){$("#postclone").drags().find("input, textarea, select, label").mousedown(function(e){e.stopPropagation()});var pinnerState=+localStorage.pinForm?"pinned":"unpinned",pinner=""}else var pinner="";if(ffdata.load(),$("").appendTo("#postclone"),$("#delform").on("submit",function(e){e.preventDefault(),Ajax.deleteItems(new FormData(this))}),$("input[name=reportpost]").click(function(e){e.preventDefault(),Ajax.reportPost(new FormData($(this).parents("form")[0]))}),$("#delform").after(""),Settings.sfwMode(!1),localStorage)for(var s in Settings)"_"!=s.substring(0,1)&&($("#js_settings").append("
"),Settings[s](!1));else $("#js_settings").append(""+_l.noLocalStorage+"
\u0422\u0432\u043E\u0439 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u2014 \u0433\u043E\u0432\u043D\u043E. \u0421\u043A\u0430\u0447\u0430\u0439 Chome, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440.");var textbox=document.getElementById("message");textbox&&(textbox.onfocus=function(){is_entering=!0},textbox.onblur=function(){is_entering=!1}),$("body").append("\n \n
\n \n \n "+(kumod_set?"":"")+"\n
\n
\n "),$(document).on("animationstart webkitAnimationStart MSAnimationStart oanimationstart",function(event){var $target=$(event.target);"nodeInserted"!=event.originalEvent.animationName||$target.hasClass("_inserted_")||processNodeInsertion($target)}),$("input[name^=embed]").on("input",function(){var $this=$(this);$this.parent().find(".site-indicator").remove();var match=embedLinks.process($(this).val());match&&$this.after("")}),$("input[name^=imagefile]").on("change",function(){var $this=$(this);if($this.val()){var nextCheckbox=$this.parent().next();nextCheckbox.length&&nextCheckbox.prop("checked",!0)}}),"undefined"!=typeof is_catalog&&is_catalog&&catalog.init(),$(".userdelete").addClass("content-background reflinkpreview"),$("").addClass("content-background reflinkpreview qreplyform").hide().appendTo("body"),$("#delform").on("click",".postertrip",function(ev){ev.preventDefault(),ev.stopPropagation();var trip=$(this).text().split("!")[1],offset=$(this).offset(),height=$(this).height();$.getJSON("/tripinfo.php",{trip:trip}).done(function(data){var active_on=[];_.each(data.active_on,function(board){active_on.push("/"+board+"/")}),$("#tripinfo").html(""+_l.threads+": "+data.threads+", "+_l.comments+": "+data.comments+"
"+_l.active_since+": "+catalog.formatDate(data.active_since,!0)+"
"+_l.last_active+": "+catalog.formatDate(data.last_active,!0)+"
"+(active_on.length?""+_l.active_on+": "+active_on.join(", ")+"
":"")).css({top:offset.top+height,left:offset.left}).fadeIn("fast")}).fail(function(error){console.error(error)})}),$("input[name=disable_name]").on("change",function(){var off=$(this).is(":checked");$(this).parents("form").find("input[name=name]").attr("disabled",off),localStorage.setItem("post_anonymously",+off)}).prop("checked",!!+localStorage.post_anonymously).trigger("change"),unreadCounter.update(),Captcha.init(),liveupd_ena&&"undefined"!=typeof io&&updater.init(),$("input[name=\"ttl-enable\"]").on("change",function(){var on=$(this).is(":checked"),$i=$(this).parents("form").find("input[name=\"ttl\"]");$i.attr("disabled",!on),on&&0==$i.val()&&$i.val(1),$i.attr("min",on?1:0)}).trigger("change")}function processNodeInsertion($node){var _Mathround2=Math.round;"undefined"==typeof $node?$node=$("body"):($node.addClass("_inserted_"),$node=$node.parents(":eq(1)")),$node.find(".prettyprint").length&&prettyPrint.apply(window),LatexIT.render($node),$node.find(".post-ttl").each(function(){var _this7=this,iv=void 0,updateTTL=function(){if($(_this7).length){var time_left=$(_this7).data("deleted-timestamp")-_Mathround2(new Date().getTime()/1e3);0<=time_left?(time_left/=3600,$(_this7).text(_.padLeft(Math.floor(time_left),2,"0")+":"+_.padLeft(_Mathround2(60*(time_left%1)),2,"0"))):($.get(document.forms.delform.action),_deleteItems([{action:"delete_post",id:$(_this7).parents(".posthead").find(".reflink > a:not(.shl)").text()}],!1,updater.markOnly),clearInterval(iv)),time_left=0<=time_left?time_left/3600:0}else clearInterval(iv)};iv=setInterval(updateTTL,30000),updateTTL()})}var chpok={init:function init(){!!(0\n