PageSourceSearch

https://brownsboard.com/assets/forum/topic-posts.e53b0c6e673a2155b80d.min.js

js brownsboard.com collected 2026-10-09 22:42:37 UTC 11,757 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1374,2765,5264,6174,7536],{2410(D,M,a){var m,d;m=[a(1749),a(9930),a(9897)],d=(function(A,P,x){const I={};let w,c=0,h=!1,v,B=0;I.init=function(r,_){const l=$("body");typeof r=="function"?(w=r,v=l):(w=_,v=r||l),c=$(window).scrollTop(),$(window).off("scroll",e).on("scroll",e),l.height()<=$(window).height()&&ajaxify.data.pagination&&ajaxify.data.pagination.pageCount>1&&w(1)};function e(){B&&clearTimeout(B),B=setTimeout(function(){B=0,C()},60)}function C(){const r=utils.findBootstrapEnvironment(),_=(r==="xs"||r==="sm")&&$("html").hasClass("composing");if(h||_||app.flags._glance)return;const l=$(window).scrollTop(),u=$(window).height(),y=v.height()-u,N=v.offset()?v.offset().top:0,S=100*(l-N)/(y<=0?u:y),L=15,W=85,R=l>c?1:-1;(S<L&&l<c||S>W&&l>c||S<0&&R>0&&y<0)&&w(R),c=l}return I.loadMore=function(r,_,l){if(h)return;h=!0;const u={method:r,data:_};A.fire("action:infinitescroll.loadmore",u),(u.method.startsWith("/")?x.get:socket.emit)(u.method,u.data,function(N,S){if(N)return h=!1,P.error(N);l(S,function(){h=!1})})},I.loadMoreXhr=function(r,_){if(h)return;h=!0;const l=config.relative_path+"/api"+location.pathname.replace(new RegExp("^"+config.relative_path),""),u={url:l,data:r};A.fire("action:infinitescroll.loadmore.xhr",u),$.get(l,r,function(y){_(y,function(){h=!1})}).fail(function(y){h=!1,P.error(String(y.responseJSON||"[[error:no-connection]]"))})},I.removeExtra=function(r,_,l){let u=$();if(r.length<=l)return u;const y=r.length-l;if(_>0){const N=$(document).height(),S=$(window).scrollTop();u=r.slice(0,y).remove(),$(window).scrollTop(S+($(document).height()-N))}else u=r.slice(r.length-y).remove();return u},I}).apply(M,m),d!==void 0&&(D.exports=d)},2269(D,M){var a,m;a=[],m=(function(){const d={},A=/-resized(\.[\w]+)?$/;return d.wrapImagesInLinks=function(P){P.find('[component="post/content"] img:not(.emoji)').each(function(){d.wrapImageInLink($(this))})},d.wrapImageInLink=function(P){let x=P.attr("src")||"";if(x!=="about:blank"&&!P.parent().is("a")){utils.isRelativeUrl(x)&&A.test(x)&&(x=x.replace(A,"$1"));const I=P.attr("alt")||"",w=x.split(".").slice(1).pop(),c=I.split("/").pop(),h=c.split(".").slice(1).pop(),v=$('<a target="_blank" rel="noopener"></a>').attr("href",x);!w&&h&&v.attr("download",c),P.wrap(v)}},d}).apply(M,a),m!==void 0&&(D.exports=m)},7536(D,M,a){var m,d;m=[a(5967),a(2410),a(8454),a(2269),a(6352),a(2473),a(7459),a(1749),a(76)],d=(function(A,P,x,I,w,c,h,v,B){const e={};e.signaturesShown={};const C=$(window);e.onNewPost=function(t){!t||!t.posts||!t.posts.length||String(t.posts[0].tid)!==String(ajaxify.data.tid)||(t.loggedIn=!!app.user.uid,t.privileges=ajaxify.data.privileges,t.posts[0].timestamp=t.posts[0].topic.scheduled?t.posts[0].timestamp:Date.now()-1e3,t.posts[0].timestampISO=utils.toISOString(t.posts[0].timestamp),e.modifyPostsByPrivileges(t.posts),_(t.posts),r(t.posts[0]),l(t.posts),ajaxify.data.postcount+=1,x.updatePostCount(ajaxify.data.postcount),config.usePagination?u(t):N(t),a.e(8631).then(function(){var o=[a(8631)];(function(n){n.onNewPost(t)}).apply(null,o)}).catch(a.oe))};function r(t){$(".pagination-block .pagebottom .timeago").timeago("update",t.timestampISO)}e.modifyPostsByPrivileges=function(t){t.forEach(function(o){o.selfPost=!!app.user.uid&&parseInt(o.uid,10)===parseInt(app.user.uid,10),o.topicOwnerPost=parseInt(o.uid,10)===parseInt(ajaxify.data.uid,10),o.display_edit_tools=ajaxify.data.privileges["posts:edit"]&&o.selfPost||ajaxify.data.privileges.isAdminOrMod,o.display_delete_tools=ajaxify.data.privileges["posts:delete"]&&o.selfPost||ajaxify.data.privileges.isAdminOrMod,o.display_moderator_tools=o.display_edit_tools||o.display_delete_tools,o.display_move_tools=ajaxify.data.privileges.isAdminOrMod,o.display_post_menu=ajaxify.data.privileges.isAdminOrMod||o.selfPost&&!ajaxify.data.locked&&!o.deleted||o.selfPost&&o.deleted&&parseInt(o.deleterUid,10)===parseInt(app.user.uid,10)||(app.user.uid||ajaxify.data.postSharing.length)&&!o.deleted})};function _(t){for(let o=0;o<t.length;o+=1){const n=c.get("user/postcount",t[o].uid);n.html(B.formattedNumber(parseInt(n.attr("data-postcount"),10)+1))}}function l(t){config.topicPostSort==="newest_to_oldest"&&(t[0].index=1,c.get("post").not("[data-index=0]").each(function(){const o=parseInt($(this).attr("data-index"),10)+1;$(this).attr("data-index",o)}))}function u(t){function o(){S(t.posts[0])}const n=t.posts;ajaxify.data.pagination.pageCount=Math.max(1,Math.ceil(n[0].topic.postcount/config.postsPerPage));const i=config.topicPostSort==="oldest_to_newest"||config.topicPostSort==="most_votes"?1:-1;if(ajaxify.data.pagination.currentPage===ajaxify.data.pagination.pageCount&&i===1||ajaxify.data.pagination.currentPage===1&&i===-1){const E=$('[component="post"]:not([data-index=0]), [component="topic/event"]');L(t,E,i,!1,o)}else ajaxify.data.scrollToMyPost&&parseInt(n[0].uid,10)===parseInt(app.user.uid,10)?setTimeout(function(){A.loadPage(ajaxify.data.pagination.pageCount,o)},250):y()}function y(){$.get(config.relative_path+"/api/topic/pagination/"+ajaxify.data.tid,{page:ajaxify.data.pagination.currentPage},function(t){app.parseAndTranslate("partials/paginator",t,function(o){$('[component="pagination"]').after(o).remove()})})}function N(t){const o=config.topicPostSort==="oldest_to_newest"||config.topicPostSort==="most_votes"?1:-1,n=$('[component="post"][data-index="'+(t.posts[0].index-1)+'"]').length;if(!n&&(!t.posts[0].selfPost||!ajaxify.data.scrollToMyPost))return;if(!n&&t.posts[0].selfPost)return ajaxify.go("post/"+t.posts[0].pid);const i=$('[component="topic"]>[component="post"]:not([data-index=0]), [component="topic"]>[component="topic/event"]');L(t,i,o,!1,function(s){s&&s.addClass("new"),S(t.posts[0])})}function S(t){t.selfPost&&ajaxify.data.scrollToMyPost&&w.scrollBottom(t.index)}function L(t,o,n,i,s){if(s=s||function(){},!t||t.posts&&!t.posts.length)return s();function E(){const g=$('[component="post"].new');if(g.length===t.posts.length){let T=!0;if(g.each(function(f,b){parseInt($(b).attr("data-pid"),10)!==parseInt(t.posts[f].pid,10)&&(T=!1)}),T){g.each(function(){$(this).removeClass("new")}),t.posts.length=0;return}}g.length&&t.posts.length>
11&&t.posts.forEach(function(T){const f=c.get("post","pid",T.pid);f.hasClass("new")&&f.remove()}),t.posts=t.posts.filter(function(T){return T.allowDupe||$('[component="post"][data-pid="'+T.pid+'"]').length===0})}if(E(),!t.posts.length)return s();let p,j;n>0&&o.length?p=o.last():n<0&&o.length&&(j=o.first()),v.fire("action:posts.loading",{posts:t.posts,after:p,before:j}),app.parseAndTranslate("topic","posts",Object.assign({},ajaxify.data,t),async function(g){g=g.filter(function(){const f=$(this),b=f.attr("data-pid"),K=f.attr("data-allow-dupe");return!f.is('[component="post"]')||K||b&&$('[component="post"][data-pid="'+b+'"]').length===0});const T=P.removeExtra($('[component="post"]'),n,Math.max(20,config.postsPerPage*2));if(p)g.insertAfter(p);else if(j){const f=$(document).height(),b=C.scrollTop();g.insertBefore(j),(i||b>0)&&C.scrollTop(b+($(document).height()-f))}else c.get("topic").append(g);await e.onNewPostsAddedToDom(g),F(T),v.fire("action:posts.loaded",{posts:t.posts}),s(g)})}e.loadMorePosts=function(t){if(!c.get("topic").length||w.scrollActive)return;const o=c.get("topic").find(c.get("post").not("[data-index=0]").not(".new")),n=t>0?o.last():o.first(),i=parseInt(n.attr("data-index"),10)||0,s=ajaxify.data.tid;if(!utils.isNumber(i)||t<0&&c.get("post","index",0).length)return;const E=$(".loading-indicator");E.is(":animated")||E.fadeIn(),P.loadMore("topics.loadMore",{tid:s,after:i+(t>0?1:0),count:config.postsPerPage,direction:t,topicPostSort:utils.params().sort||config.topicPostSort},function(p,j){if(E.fadeOut(),p&&p.posts&&p.posts.length){const g=$('[component="post"]:not([data-index=0]):not(.new), [component="topic/event"]');L(p,g,t,!0,j)}else w.update(),j()})},e.onTopicPageLoad=async function(t){O(t),I.wrapImagesInLinks(t),R(t),e.showBottomPostBar(),t.find('[component="post/content"] img:not(.not-responsive)').addClass("img-fluid"),e.addBlockquoteEllipses(t),U(t),await W()},e.addTopicEvents=async function(t){if(config.topicPostSort==="most_votes")return;const o=await Promise.all(t.map(n=>app.parseAndTranslate("partials/topic/event",{...n,privileges:ajaxify.data.privileges})));if(config.topicPostSort==="oldest_to_newest")$('[component="topic"]').append(o);else if(config.topicPostSort==="newest_to_oldest"){const n=$('[component="topic"] [component="post"][data-index="0"]');n.length?n.after(o.reverse()):$('[component="topic"]').prepend(o.reverse())}$('[component="topic/event"] .timeago').timeago()};async function W(){const t=ajaxify.data.necroThreshold*24*60*60*1e3;if(!t||config.topicPostSort!=="newest_to_oldest"&&config.topicPostSort!=="oldest_to_newest")return;const o=C.scrollTop(),n=$('[component="post"]').toArray();await Promise.all(n.map(async function(i){i=$(i);const s=i.prev('[component="post"]');if(i.is(":has(.necro-post)")||!s.length||config.topicPostSort==="newest_to_oldest"&&parseInt(s.attr("data-index"),10)===0)return;const E=i.attr("data-timestamp")-s.attr("data-timestamp");if(Math.abs(E)>=t){const p=["suffixAgo","prefixAgo","suffixFromNow","prefixFromNow"],j={};p.forEach(f=>{j[f]=$.timeago.settings.strings[f],$.timeago.settings.strings[f]=""});const g=(E>0?"[[topic:timeago-later,":"[[topic:timeago-earlier,")+$.timeago.inWords(E)+"]]";p.forEach(f=>{$.timeago.settings.strings[f]=j[f]});const T=await app.parseAndTranslate("partials/topic/necro-post",{text:g});T.attr("data-necro-post-index",s.attr("data-index")),T.insertBefore(i)}})),o>0&&C.scrollTop()<o&&C.scrollTop(o)}function R(t){ajaxify.data["signatures:hideDuplicates"]&&t.each((o,n)=>{const i=$(n).find('[component="post/signature"]'),s=i.attr("data-uid");e.signaturesShown[s]?i.addClass("hidden"):e.signaturesShown[s]=!0})}function F(t){t.each((o,n)=>{$(`[data-necro-post-index="${$(n).attr("data-index")}"]`).remove()})}function O(t){if(app.user.uid||!ajaxify.data.privateUploads)return;const o=document.createElement("a");o.className="login-required",o.href=config.relative_path+"/login",h.translate("[[topic:login-to-view]]",function(n){o.appendChild(document.createTextNode(n)),t.each(function(i,s){$(s).find('[component="post/content"] img').each(function(E,p){p=$(p),p.attr("src").startsWith(config.relative_path+config.upload_url)&&p.replaceWith(o.cloneNode(!0))})})})}e.onNewPostsAddedToDom=async function(t){await e.onTopicPageLoad(t),t.find(".timeago").timeago()},e.showBottomPostBar=function(){const t=c.get("post","index",0),o=$(".post-bar-placeholder"),n=$('[component="post"]');t.length&&n.length>1&&$(".post-bar").length<2&&o.length?($(".post-bar").clone().insertAfter(o),o.remove()):t.length&&n.length<2&&t.find(".post-bar").remove()};function U(t){t.each(function(){$(this).hasClass("deleted")&&x.toggle($(this).attr("data-pid"),!0)})}return e.addBlockquoteEllipses=function(t){t.find('[component="post/content"] blockquote').filter((i,s)=>!$(s).parent().is("blockquote")).find(">blockquote").each(function(){const i=$(this);i.find(":hidden:not(br)").length&&!i.find(".toggle").length&&i.append('<button class="toggle btn btn-ghost btn-sm d-inline-block py-1 px-3"><i class="fa fa-angle-down"></i>')})},e}).apply(M,m),d!==void 0&&(D.exports=d)},3230(D,M,a){var m,d;(function(A){m=A,d=typeof m=="function"?m.call(M,a,M,D):m,d!==void 0&&(D.exports=d)})(function(){const A=/[^\p{L}\s\d\-_@.]/gu,P=/[^\w\s\d\-_@.]/g,x=/^\s+|\s+$/g,I=/\s+/g,w=/-+/g,c=/-$/g,h=/^-/g,v=/^[\w\d\s.,\-@]+$/;return function(e,C){return!e||(e=String(e).replace(x,""),v.test(e)?e=e.replace(P,"-"):e=e.replace(A,"-"),e=C?e:e.toLocaleLowerCase(),e=e.replace(I,"-"),e=e.replace(w,"-"),e=e.replace(c,""),e=e.replace(h,""),e==="."||e==="..")?"":e}})}}]);

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.