PageSourceSearch

https://galgame.dev/assets/forum/topic-votes.d0cd66cf9e056a1b81db.min.js

js galgame.dev collected 2026-10-01 13:13:28 UTC 4,717 bytes, 1 lines download raw bytes

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