PageSourceSearch

https://newtun.ru/.s/src/photopage.min.js

js newtun.ru collected 2026-10-08 01:03:08 UTC 14,323 bytes, 1 lines download raw bytes

1window.processComments={initialise:function(o,t,n,e){var i=this;i.comPage=0,i.comParentBlock=$("#photoModalWrap").find(o),i.comShowBtn=$(t),i.comAddBtn=$(n),i.comAddFrm=$(e),i.loadCmtsFlag=!0,i.comLoading=$("#modalCmtsLoading"),$(i.comAddBtn).click((function(o){o.preventDefault(),$(this).parent().addClass("comAddOpened"),window.processComments.posAddComBtn("position")})),$("<a/>",{id:"hideComFrm",text:window.ulb?.closeBtn||window.uFancy?.defaults.l10n.CLOSE||"Close",style:"margin-left: 5px"}).addClass("button").insertAfter("#addcBut").click((function(){$("#mphoto-addcmt").removeClass("comAddOpened"),window.processComments.posAddComBtn("position")})),window.uFancy&&(i.showMoreBtn=$("<a/>",{id:"load_more_comments",text:"Показать еще",style:"margin-left: 5px"}),i.showMoreBtn.addClass("button").insertAfter("#mphoto-addcmt-btn").click((function(){i.loadCmtsFlag&&(window.processComments.comLoading.show(),i.loadComments(window.processComments.commentsUrl.url,window.processComments.commentsUrl.entryId))}))),i.commentsBuffer=null,i.commentsUrl=i.getCommentsUrl(window.photo.currentUrl),i.loadComments(i.commentsUrl.url,i.commentsUrl.entryId),$("#photoModalWrap").scroll((function(o){i.loadCmtsFlag&&$(window).height()+$("#photoModalWrap").scrollTop()+window.processComments.paddingBoottom>=$("#photoModalWrap")[0].scrollHeight&&(window.processComments.comLoading.show(),i.loadComments(window.processComments.commentsUrl.url,window.processComments.commentsUrl.entryId)),window.processComments.posAddComBtn("reposition")})),window.processComments.posAddComBtn("position"),$(window).resize((function(){$("#photoModalWrap").length&&window.processComments.posAddComBtn("position")})),i.paddingBoottom=parseInt($(".fancybox-outer").css("padding-bottom"),10)+parseInt($(".fancybox-wrap").css("padding-bottom"),10),i.paddingTop=parseInt($(".fancybox-outer").css("padding-top"),10)+parseInt($(".fancybox-wrap").css("padding-top"),10),window.processComments.posAddComBtn("position")},posAddComBtn:function(o){var t=$("#mphoto-addcmt"),n=$("#photoModalWrap").find("#u-photo").outerHeight(),e=t.outerHeight(),i=$("#photoModalWrap").find("#u-photo").width();"position"===o&&!window.uFancy&&t.width(i),$(window).height()+$("#photoModalWrap").scrollTop()+this.paddingBoottom<$("#photoModalWrap")[0].scrollHeight?($("#dynPhoto").css("padding-bottom",e+"px"),t.addClass("fixedAddComBtn"),t.css("margin-left",-i/2),0<=(o=$(window).height()+$("#photoModalWrap").scrollTop()-n-this.paddingTop-e)?t.css("bottom","0px"):t.css("bottom",o+"px")):(t.removeClass("fixedAddComBtn"),t.css("margin-left",0),$("#dynPhoto").css("padding-bottom","0px"))},getCommentsUrl:function(o){var t=(o=window.photo.getLastDigitFromUrl(o)).digit;return{url:window.photo.getLastDigitFromUrl(o.substrUrl).substrUrl,entryId:t}},loadComments:function(o,t){var n=this;n.comPage+=1,$.ajax({url:o+"-"+n.comPage+"-"+t+"-24",data:"json",error:function(o,t,e){console.log(t+", "+e),n.comments=null,window.processComments.comLoading.hide(),n.loadCmtsFlag=!1},success:function(o,t){if(window.processComments.comLoading.hide(),null===o.comments||""===o.comments)console.log("no comments"),null!==n.commentsBuffer&&n.insertComments(n.commentsBuffer),n.comShowBtn.hide(),n.commentsBuffer=null,n.loadCmtsFlag=!1;else{var e=$("<div/>",{style:"display: none;",html:o.comments});console.log("got comments"),null===n.commentsBuffer?(n.insertComments(e),1!==n.comPage&&(n.commentsBuffer=e),n.loadComments(n.commentsUrl.url,n.commentsUrl.entryId)):(2!==n.comPage&&n.insertComments(n.commentsBuffer),n.commentsBuffer=e)}},complete:function(){n.loadCmtsFlag||n.showMoreBtn?.hide()}})},insertComments:function(o){this.commentsBuffer=o,this.comParentBlock.append(o),o.fadeIn(200),window.processComments.posAddComBtn("reposition")}},window.photo={init:function(){if($("#u-photos").length?window.photo.root=$("#u-photos"):window.photo.root=$("#uEntriesList"),window.photo.details=window.photo.root.find(".ph-js-details"),window.photo.modalDetails=$("#photoModalWrap").find(".ph-js-details"),window.photo.root.find(".ph-author").click((function(o){o.stopPropagation(),o.preventDefault()})),window.photo.detailsInit(window.photo.details,"window.photo.details"),$("body").click((function(){window.photo.details.removeClass("phr-opened"),window.photo.modalDetails.removeClass("phr-opened")})),badBrowser&&($(".photo-expand").hover((function(){$(this).addClass("hovered")}),(function(){$(this).removeClass("hovered")})),$("#oldPhotos").delegate("a","click",(function(o){window.location.href=$(this).attr("href")}))),"undefined"!=typeof uShowLightboxPage&&uShowLightboxPage){Object.size=function(o){var t,n=0;for(t in o)o.hasOwnProperty(t)&&n++;return n},window.photo.currentShownPage=window.photo.photoVars.currentPage,window.photo.pageUrlMask=window.photo.photoVars.pageUrlMask.replace("%a","2"),window.photo.photoVars.photoIds.length=Object.
1size(window.photo.photoVars.photoIds);var o=function(o,t){o.preventDefault(),window.photo.popupEvent=!1;var n=t.attr("href");window.photo.getRealUrl(n,(function(o){for(var t=o.split("#")[0].split("/");"photo"!==t[t.length-2];)t.splice(t.length-2,1),t.join("/");t=t.join("/"),window.photo.modalId=window.photo.getLastDigitFromUrl(t).digit,(t=t.split("/")).splice(-1,1,"0-0-"+window.photo.modalId),t=t.join("/"),window.photo.fakeLoad(t,window.photo.loadModal)}))};window.photo.root.find(".photo-title a, .phd-comments").click((function(t){return window.photo.currentShownPage=window.photo.photoVars.currentPage,o(t,$(this)),!1})),$.isFunction($.fn.live)?$(".ulb-photopage-link").live("click",(function(t){return o(t,$(this)),!1})):$(".ulb-photopage-link").on("click",(function(t){return o(t,$(this)),!1})),window.photo.originalTitle=$("title").text(),window.photo.autoFancyClose=!1,window.photo.popupEvent=!1,window.history&&history.pushState&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(window.photo.historyModern=!0,window.history.replaceState({ucozPhoto:!0},null,window.location.href),window.onpopstate=function(o){o.state&&window.photo.processPopstate()}),window.photo.processPopstate(),$(window).keydown((function(o){window.photo.nextLink&&"text"!==o.target.type&&"textarea"!==o.target.type&&(39===o.keyCode?window.photo.nextLink.click():37===o.keyCode&&window.photo.prevLink.click())}))}},processPopstate:function(){var o;window.photo.popupEvent=!0,window.photo.autoFancyClose=!1,$.each(location.search.substring(1).split("&"),(function(t){o=o||this.split("photo=")[1]})),o?window.photo.fakeLoad("//"+location.hostname+"/photo/0-0-"+o,window.photo.loadModal):$.fancybox&&(window.photo.autoFancyClose=!1,$.fancybox.close())},fakeLoad:function(o,t){window.photo.historyModern?(window.photo.currentUrl=o,console.log("loading..."),$.fancybox?.showLoading(),window.photo.modalId=window.photo.getLastDigitFromUrl(o).digit,window.photo.popupEvent?window.photo.autoFancyClose=!1:(window.photo.autoFancyClose=!0,window.history.pushState({ucozPhoto:!0},null,window.location.pathname+"?photo="+window.photo.modalId)),t(o)):window.location.href=o},loadModal:function(o){o+="-22";var t="photo-"+window.photo.modalId;console.log("ID: "+t);var n=$("<div/>",{id:t,style:"display: none"}).appendTo("body");$.ajax({url:o,error:function(o,t,n){console.log(t+", "+n),window.photo.comments=null},success:function(o,e){if(window.uCoz&&window.uCoz.uwbb&&!window.photo.popupEvent&&window.uCoz.uwbb.instances){var i=window.uCoz.uwbb.instances.pop();if(!i)return;var a=i.$txtArea;i.destroy(),a.remove(),$("textarea.commFl").wysibb()}n.html(o.currentPhoto).find("#acform").hide(),$.fancybox&&$.fancybox({tpl:ulbCustomTpl,fitToView:!1,autoHeight:!0,scrolling:"no",minWidth:parseInt(window.photo.pagePhotoWidth,10)+40,maxWidth:parseInt(window.photo.pagePhotoWidth,10)+240,href:"#"+t,padding:10,preload:5,openEffect:"fade",closeEffect:"fade",nextEffect:"fade",prevEffect:"fade",openEasing:"linear",nextEasing:"linear",prevEasing:"linear",fixed:!0,beforeShow:function(){$(".fancybox-wrap").wrap('<div id="photoModalWrap"></div>').wrap('<div id="fakeArrowsBlock"></div>'),window.photo.addNavArrows(window.photo.currentUrl),$("body").css({overflow:"hidden"}),window.photo.toggleDocumentTitle(!1)},afterShow:function(){$("#fancybox-overlay").css("z-index",10005),window.photo.afterShowModal()},beforeClose:function(){window.photo.resetHistoryWithEmptyState(),window.photo.toggleDocumentTitle(!0)},afterClose:function(){$("body").css({overflow:"auto"}),$("#photoModalWrap").remove(),$("#"+t).remove()},helpers:{title:null,overlay:{opacity:.6,speedIn:0,speedOut:0}},keys:{next:{},prev:{}}}),window.fancy5.init(t)}})},getNextPrevIds:function(o){function t(o,t){return e="next"===t?a+1:a-1,void 0===(n=window.photo.photoVars.photoIds[window.photo.currentShownPage][e])&&("next"===t?(i=void 0!==window.photo.photoVars.photoIds[window.photo.currentShownPage+1]?window.photo.currentShownPage+1:1,window.photo.nextBtnPage=i):(i=void 0!==window.photo.photoVars.photoIds[window.photo.currentShownPage-1]?window.photo.currentShownPage-1:window.photo.photoVars.photoIds.length,window.photo.prevBtnPage=i),window.photo.photoVars.photoIds[i]?n="next"===t?window.photo.photoVars.photoIds[i][0]:window.photo.photoVars.photoIds[i][window.photo.photoVars.photoIds[i].length-1]:$.ajax({url:window.photo.pageUrlMask.replace("%p",i||2).replace(/\d$/,1),async:!1,error:function(o,t,n){console.log(t+", "+n)},success:function(o,e){o=o.map((function(o){return o[0]})),n="next"===t?o[0]:o[o.length-1],window.photo.photoVars.photoIds[i]=o}})),n}var n,e,i;o=parseInt(o,10),window.photo.currentId=o;var a=window.photo.photoVars.photoIds[window.photo.currentShownPage].indexOf(o);return window.photo.nextBtnPage=window.photo.currentShownPage,window.photo.prevBtnPage=window.photo.currentShownPage,{next:t(0,"next"),prev:t(0,"prev")}},addNavArrows:function(o){var t=this;o=(n=window.photo.getLastDigitFromUrl(o)).substrUrl;var n=(e=window.photo.getNextPrevIds(n.digit)).next,e=e.prev,i=$("#photoModalWrap");t.prevLink=$("<a/>",{href:o+"-"+e,html:"<span></span>",style:"display: none;"}).addClass("fancybox-nav modalArrow fancybox-prev").attr("data-changepage",window.photo.prevBtnPage),t.nextLink=t.prevLink.clone().attr("href",o+"-"+n).attr("data-changepage",window.photo.nextBtnPage).removeClass("fancybox-prev").addClass("fancybox-next"),$.each([t.prevLink,t.nextLink],(function(){var o=this;o.insertBefore(i).fadeIn(),o.click((function(n){return n.preventDefault(),window.photo.autoFancyClose=!0,t.getRealUrl($(o).attr("href"),(function(n){n&&(t.fakeLoad(n,t.loadModal),window.photo.currentShownPage=parseInt($(o).data("changepage"),10))})),!1}))})),n=(o=$("<a/>").addClass("fakeArrow").attr("data-target",".fancybox-prev")).clone().attr("data-target",".fancybox-next").addClass("fakeArrowNext"),$.each([o,n],(function(){i.find("#fakeArrowsBlock").append(this),this.hover((function(){$($(this).data("target")).addClass("hovered")}),(function(){$($(this).data("target")).removeClass("hovered")})),this.click((function(){$($(this).data("target")).trigger("click")}))}))},getLastDigitFromUrl:function(o){for(var t,n=-1;"-"!=t&&"/"!=t;)n-=1,t=o.slice(n,n+1);return t=o.slice(n+1),{substrUrl:o=o.slice(0,n),digit:t}}
1,detailsInit:function(o,t){o.find(".phd-rating").click((function(t){return(t=$(this).parent()).hasClass("phr-opened")||(o.removeClass("phr-opened"),t.addClass("phr-opened")),!1})),o.find(".phd-dorating").each((function(){$(this).find("a").length||$(this).find(".u-current-rating").css("visibility","visible"),$(this).click((function(){return $(this).find(".u-current-rating").css("visibility","visible"),setTimeout(t+".removeClass('phr-opened')",900),!1}))}))},getRealUrl:function(o,t){$.ajax({headers:{getlink:1},url:o,dataType:"json",success:function(o){o.photo_id&&o.album_id&&(href="/photo/"+o.album_id+"-0-"+o.photo_id,t&&t(href))}})},toggleDocumentTitle(o=!0){const t=$("#dynPhoto").find(".photo-etitle").text()+" - "+this.originalTitle;document.title=o?this.originalTitle:t,this.autoFancyClose=!1,this.popupEvent=!1},afterShowModal(){if(window.processComments.initialise("#allEntries","#mphoto-showcmt","#mphoto-addcmt-btn","#acform"),this.modalDetails=$("#photoModalWrap").find(".ph-js-details"),this.detailsInit(this.modalDetails,"window.photo.modalDetails"),window.addcom&&window.uCoz&&window.uCoz.uwbb){var o=window.addcom;window.addcom=function(){window.uCoz.uwbb.syncAll?.(),o()}}},resetHistoryWithEmptyState(){(this.autoFancyClose||this.popupEvent||this.historyModern)&&window.history.pushState({ucozPhoto:!0},null,window.location.href.replace(window.location.search,""))}};var badBrowser=!1;document.addEventListener("DOMContentLoaded",(function(){$.browser?$.browser.msie&&10>$.browser.version&&"BackCompat"==document.compatMode&&(badBrowser=!0):document.documentMode&&10>document.documentMode&&(badBrowser=!0),window.photo.init()})),window.fancy5={store:{},getSlides(o){let t=[{src:`#${o}`,type:"inline"}];return this.isSinglePhoto()?t:[{},...t,{}]},fancy5ChangePhotoPage:function(o,t,n,e){o.showLoading(o.getSlide());const{getLastDigitFromUrl:i,getNextPrevIds:a,getRealUrl:d,loadModal:s,fakeLoad:r,currentUrl:p}=window.photo,w=n>e,{substrUrl:h,digit:c}=i(p),{prev:l,next:m}=a(c),u=`${h}-${w?m:l}`,{nextBtnPage:f,prevBtnPage:g}=window.photo,v=w?f:g;d(u,(o=>{o&&(r(o,s),window.photo.currentShownPage=v)}))},isSinglePhoto(){const{photoVars:{currentPage:o,photoIds:t}}=window.photo;return 1===t[o].length},cleanupFancyArtifacts(o){document.getElementById("photoModalWrap")?.remove(),document.querySelector("body > div:has(.g-recaptcha-bubble-arrow)")?.remove(),setTimeout((()=>document.getElementById(o)?.remove()),0)},changeInstance(o,t){const{instance:n=null,destroyAndCleanup:e}=this.store;n&&(n.destroy(),e()),this.store={instance:o,destroyAndCleanup:()=>this.cleanupFancyArtifacts(t)}},init(o){window.uFancy?.show(this.getSlides(o),{mainClass:"ufancy-container ufancy-photo-page",startIndex:1,backdropClick:!1,Carousel:{transition:!1,infinite:!1},on:{"Carousel.change":this.fancy5ChangePhotoPage,ready:t=>{this.changeInstance(t,o),$(".fancybox__container").wrap('<div id="photoModalWrap"></div>').wrap('<div id="fakeArrowsBlock"></div>'),window.photo.toggleDocumentTitle(!1)},done:()=>window.photo.afterShowModal(),destroy:()=>{window.photo.resetHistoryWithEmptyState(),window.photo.toggleDocumentTitle(!0),this.cleanupFancyArtifacts(o),this.store={}}}})}};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.