PageSourceSearch

https://dalathoa.com/assets/forum/topic-votes.c4d812eecdbb62ebcbb5.min.js

js dalathoa.com collected 2026-10-08 19:31:24 UTC 4,861 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,34271,63154,99127],{34342(I,A,c){var p,C;p=[c(52473),c(17459),c(49897),c(91749),c(33530),c(29930),c(89336)],C=(function(d,P,h,l,g,m,y){const f={};let E={};f.addVoteHandler=function(){E={},D()&&(d.get("topic").on("mouseenter",'[data-pid] [component="post/vote-count"]',s),d.get("topic").on("mouseleave",'[data-pid] [component="post/vote-count"]',t)),d.get("topic").on("mouseenter",'[data-pid] [component="post/announce-count"]',s),d.get("topic").on("mouseleave",'[data-pid] [component="post/announce-count"]',t)};function D(){const{upvoteVisibility:n,privileges:r}=ajaxify.data;return r.isAdminOrMod||n==="all"||n==="loggedin"&&config.loggedIn}function O(){const{upvoteVisibility:n,downvoteVisibility:r,privileges:a}=ajaxify.data;return a.isAdminOrMod||n==="all"||r==="all"||(n==="loggedin"||r==="loggedin")&&config.loggedIn}function t(){const n=$(this),r=n.parents("[data-pid]").attr("data-pid"),a=y.Tooltip.getInstance(this);a&&(a.dispose(),n.attr("title","")),E[r]=!1}function s(){const n=$(this),a=n.parent().parents("[data-pid]").attr("data-pid");E[a]=!0;const e=y.Tooltip.getInstance(this);e&&(e.dispose(),n.attr("title",""));const i=n.attr("component")==="post/vote-count"?`/posts/${encodeURIComponent(a)}/upvoters`:`/posts/${encodeURIComponent(a)}/announcers/tooltip`;h.get(i,{},function(T,u){if(T)return m.error(T);E[a]&&u&&o(n,u)})}function o(n,r){function a(i){n.attr("title",i),new y.Tooltip(n,{container:"#content",html:!0}).show()}let e=r.usernames.filter(i=>i!=="[[global:former-user]]");e.length&&(e.length+r.otherCount>r.cutoff?(e=e.join(", ").replace(/,/g,"|"),P.translate("[[topic:users-and-others, "+e+", "+r.otherCount+"]]",function(i){i=i.replace(/\|/g,","),a(i)})):(e=e.join(", "),a(e)))}return f.toggleVote=function(n,r,a){const e=n.closest("[data-pid]"),T=e.find(r).length?"del":"put",u=e.attr("data-pid");if(!app.user.uid){let v;return utils.isNumber(u)?v=config.url+"/post/"+u:v=u,c.e(91722).then(c.bind(c,91722)).then(({trigger:x})=>{x("like",{object:v})}),!1}return h[T](`/posts/${encodeURIComponent(u)}/vote`,{delta:a},function(v){if(v)return m.error(v);l.fire("action:post.toggleVote",{pid:u,delta:a,unvote:T==="del"})}),!1},f.showVotes=function(n){O()&&h.get(`/posts/${encodeURIComponent(n)}/voters`,{},function(r,a){if(r)return m.error(r);app.parseAndTranslate("modals/votes",a,function(e){const i=g.dialog({title:"[[global:voters]]",message:e,className:"vote-modal",show:!0,onEscape:!0,backdrop:!0});i.on("click",function(){i.modal("hide")})})})},f.showAnnouncers=async function(n){const r=await h.get(`/posts/${encodeURIComponent(n)}/announcers`,{}).catch(i=>m.error(i)),a=await app.parseAndTranslate("modals/announcers",r),e=g.dialog({title:`[[topic:announcers-x, ${r.announceCount}]]`,message:a,className:"announce-modal",show:!0,onEscape:!0,backdrop:!0});e.on("click",function(){e.modal("hide")})},f}).apply(A,p),C!==void 0&&(I.exports=C)},49897(I,A,c){c.r(A),c.d(A,{del:()=>O,get:()=>m,head:()=>y,patch:()=>E,post:()=>f,put:()=>D});var p=c(91749),C=c.n(p),d=c(33530),P=c.n(d);const h=config.relative_path+"/api/v3";async function l(t,s){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:h+t.url,typeof s=="function"){g(t).then(o=>s(null,o),o=>s(o));return}try{return await g(t)}catch(o){if(o.message==="A valid login session was not found. Please log in and try again."){const{url:n}=await(0,p.fire)("filter:admin.reauth",{url:"login"});return(0,d.confirm)("[[error:api.reauth-required]]",r=>{r&&ajaxify.go(n)})}throw o}}async function g(t){const{url:s}=t;delete t.url,t.data&&!(t.data instanceof FormData)&&(t.data=JSON.stringify(t.data||{}),t.headers["content-type"]="application/json; charset=utf-8"),{options:t}=await(0,p.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const o=await fetch(s,t),{headers:n}=o;if(n.get("x-redirect"))return g({url:n.get("x-redirect"),...t});const r=n.get("content-type"),a=r&&r.startsWith("application/json");let e;if(t.method!=="HEAD"&&(a?e=await o.json():e=await o.text()),!o.ok){if(e){const i=a&&(e.status?.message||e.error||"");throw new Error(a&&i?i:e)}throw new Error(o.statusText)}return a&&e&&e.hasOwnProperty("status")&&e.hasOwnProperty("response")?e.response:e}function m(t,s,o){return l({url:t+(s&&Object.keys(s).length?"?"+$.param(s):"")},o)}function y(t,s,o){return l({url:t+(s&&Object.keys(s).length?"?"+$.param(s):""),method:"HEAD"},o)}function f(t,s,o){return l({url:t,method:"POST",data:s,headers:{"x-csrf-token":config.csrf_token}},o)}function E(t,s,o){return l({url:t,method:"PATCH",data:s,headers:{"x-csrf-token":config.csrf_token}},o)}function D(t,s,o){return l({url:t,method:"PUT",data:s,headers:{"x-csrf-token":config.csrf_token}},o)}function O(t,s,o){return l({url:t,method:"DELETE",data:s,headers:{"x-csrf-token":config.csrf_token}},o)}}}]);

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.