PageSourceSearch

https://onemoremini.fr/assets/forum/topic-votes.17f5e0e2d45058e36d0c.min.js

js onemoremini.fr collected 2026-09-24 11:19:30 UTC 8,549 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,18314,22067,34271,43602,49897,63154,87212,99127],{34342(T,E,r){var u,h;u=[r(52473),r(17459),r(49897),r(91749),r(65303),r(29930),r(89336),r(81335)],h=(function(l,d,s,p,x,O,w,v){const P={};let e={};P.addVoteHandler=function(){e={},i()&&(l.get("topic").on("mouseenter",'[data-pid] [component="post/vote-count"]',A),l.get("topic").on("mouseleave",'[data-pid] [component="post/vote-count"]',y)),l.get("topic").on("mouseenter",'[data-pid] [component="post/announce-count"]',A),l.get("topic").on("mouseleave",'[data-pid] [component="post/announce-count"]',y)};function i(){const{upvoteVisibility:t,privileges:o}=ajaxify.data;return o.isAdminOrMod||t==="all"||t==="loggedin"&&config.loggedIn}function m(){const{upvoteVisibility:t,downvoteVisibility:o,privileges:n}=ajaxify.data;return n.isAdminOrMod||t==="all"||o==="all"||(t==="loggedin"||o==="loggedin")&&config.loggedIn}function y(){const t=$(this),o=t.parents("[data-pid]").attr("data-pid"),n=w.Tooltip.getInstance(this);n&&(n.dispose(),t.attr("title","")),e[o]=!1}function A(){const t=$(this),n=t.parent().parents("[data-pid]").attr("data-pid");e[n]=!0;const a=w.Tooltip.getInstance(this);a&&(a.dispose(),t.attr("title",""));const g=t.attr("component")==="post/vote-count"?`/posts/${encodeURIComponent(n)}/upvoters`:`/posts/${encodeURIComponent(n)}/announcers/tooltip`;s.get(g,{},function(f,c){if(f)return O.error(f);e[n]&&c&&M(t,c)})}async function M(t,o){function n(f){t.attr("title",f),new w.Tooltip(t,{container:"#content",html:!0}).show()}const a=o.usernames.filter(f=>f!=="[[global:former-user]]");if(!a.length)return;const g=a.join(", ");if(a.length+o.otherCount>o.cutoff){const f=await d.translateKey("topic:users-and-others",[g,o.otherCount]);n(f)}else n(utils.escapeHTML(g))}return P.toggleVote=async function(t,o,n,a){const g=t.closest("[data-pid]"),f=o.replace(/^\./,""),c=t.hasClass(f),L=c?"del":"put",I=c?-n:n,U=g.attr("data-pid");if(!app.user.uid){if(!config.activitypub.enabled)return ajaxify.go("login"),!1;let C;return utils.isNumber(U)?C=config.url+"/post/"+U:C=U,r.e(91722).then(r.bind(r,91722)).then(({trigger:R})=>{R("like",{object:C})}),!1}t.toggleClass(f),a&&t.find(a).toggleClass("fa text-danger",!c).toggleClass("fa-regular text-muted",c);const D=g.find('[component="post/vote-count"], [component="upvote-count"]');if(D.length){const C=parseInt(D.attr("data-votes")||D.text(),10)||0;D.text(C+I).attr("data-votes",C+I)}try{await s[L](`/posts/${encodeURIComponent(U)}/vote`,{delta:I})}catch(C){if(t.toggleClass(f),a&&t.find(a).toggleClass("fa text-danger",!c).toggleClass("fa-regular text-muted",c),D.length){const R=parseInt(D.attr("data-votes")||D.text(),10)||0;D.text(R-I).attr("data-votes",R-I)}return O.error(C.message),!1}return p.fire("action:post.toggleVote",{pid:U,delta:I,unvote:L==="del"}),!1},P.showVotes=async function(t){if(!m())return;const o=await s.get(`/posts/${encodeURIComponent(t)}/voters`,{}),n=await v.render("modals/votes",o),a=await x.dialog({title:"[[global:voters]]",message:n,className:"vote-modal",show:!0,onEscape:!0,backdrop:!0});a.on("click",function(){a.modal("hide")})},P.showAnnouncers=async function(t){const o=await s.get(`/posts/${encodeURIComponent(t)}/announcers`,{}).catch(g=>O.error(g)),n=await app.parseAndTranslate("modals/announcers",o),a=await x.dialog({title:`[[topic:announcers-x, ${o.announceCount}]]`,message:n,className:"announce-modal",show:!0,onEscape:!0,backdrop:!0});a.on("click",function(){a.modal("hide")})},P}).apply(E,u),h!==void 0&&(T.exports=h)},49897(T,E,r){r.r(E),r.d(E,{del:()=>A,get:()=>P,head:()=>e,patch:()=>m,post:()=>i,put:()=>y});var u=r(91749),h=r.n(u),l=r(65303),d=r(17459),s=r.n(d),p=r(68636),x=r.n(p);const O=config.relative_path+"/api/v3";async function w(t,o){if(t.url=t.url.startsWith("/api")?config.relative_path+t.url:O+t.url,t.headers=t.headers||{},t.headers["x-return-to"]||(t.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof o=="function"){v(t).then(n=>o(null,n),n=>o(n));return}try{return await v(t)}catch(n){if(n.message===await d.translate("[[error:api.401]]",config.userLang)){const{url:a}=await(0,u.fire)("filter:admin.reauth",{url:"login"}),g=await d.translate("[[error:api.reauth-required]]",config.userLang);(0,l.confirm)(g,f=>{f&&(p.setItem("location-hash",window.location.hash),ajaxify.go(a))})}throw n}}async function v(t){const{url:o}=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,u.fire)("filter:api.options",{options:t}),t.data&&(t.body=t.data,delete t.data);const n=await fetch(o,t),{headers:a}=n;if(a.get("x-redirect"))return v({url:a.get("x-redirect"),...t});const g=a.get("content-type"),f=g&&g.startsWith("application/json");let c;if(t.method!=="HEAD"&&(f?c=await n.json():c=await n.text()),!n.ok){if(c){const L=f&&(c.status?.message||c.error||""),I=typeof c=="string"?c:n.statusText||`[[error:api.${n.status}]]`;throw new Error(f&&L?L:I)}throw new Error(n.statusText)}return f&&c&&c.hasOwnProperty("status")&&c.hasOwnProperty("response")?c.response:c}function P(t,o,n){return w({url:t+(o&&Object.keys(o).length?"?"+$.param(o):"")},n)}function e(t,o,n){return w({url:t+(o&&Object.keys(o).length?"?"+$.param(o):""),method:"HEAD"},n)}function i(t,o,n,a){return M("POST",t,o,n,a)}function m(t,o,n,a){return M("PATCH",t,o,n,a)}function y(t,o,n,a){return M("PUT",t,o,n,a)}function A(t,o,n,a){return M("DELETE",t,o,n,a)}function M(t,o,n,a,g){return typeof a=="function"&&(g=a,a={}),w({url:o,method:t,data:n,headers:{"x-csrf-token":config.csrf_token,...a}},g)}},65303(T,E,r){r.r(E),r.d(E,{alert:()=>p,confirm:()=>x,dialog:()=>s,prompt:()=>O,promptPassword:()=>w});var u=r(33530),h=r.n(u),l=r(17459),d=r.n(l);u.setDefaults({locale:config.userLang}),l.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(e=>{u.addLocale(config.userLang,{OK:e[0],CANCEL:e[1],CONFIRM:e[2]}),u.setLocale(config.userLang)});async function s(e){const[i,m,y]=await Promise.all([l.translate(e.title||""),v(e)||"",P(e.buttons)]);return u.dialog({...e,title:i,message:m,buttons:y})}async function p(e,i){const[m,y]=await Promise.all([e&&e.title?l.translate(e.title):null,v(e)]);return i=typeof i=="function"?i:e.callback,u.alert({...e,title:m,message:y,callback:i})}async function x(e,i){const[m,y]=await Promise.all([e&&e.title?l.translate(e.title):null,v(e)]);return i=typeof i=="function"?i:e.callback,u.confirm({...e,title:m,message:y,callback:i})}async function O(e,i){const[m,y]=await Promise.all([l.translate(typeof e=="string"?e:e.title),e&&e.message?v(e):null]);return i=typeof i=="function"?i:e.callback,u.prompt({...e,title:m,message:y,callback:i})}async function w(e){return typeof e=="string"&&(e={title:e}),e=e||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(i=>{O({...e,inputType:"password",required:!0,value:"",callback:i})})}function v(e){const i=e&&e.message?e.message:e;return i instanceof jQuery?i:l.translate(i||"")}async function P(e){if(!Object.keys(e||{}).length)return;const i=Object.values(e);return await Promise.all(i.map(async m=>({...m,label:await l.translateKey(m.label)})))}},68636(T,E,r){var u;u=(function(){function h(){this._store={},this._keys=[]}h.prototype.isMock=!0,h.prototype.setItem=function(s,p){s=String(s),this._keys.indexOf(s)===-1&&this._keys.push(s),this._store[s]=p},h.prototype.getItem=function(s){return s=String(s),this._keys.indexOf(s)===-1?null:this._store[s]},h.prototype.removeItem=function(s){s=String(s),this._keys=this._keys.filter(function(p){return p!==s}),this._store[s]=null},h.prototype.clear=function(){this._keys=[],this._store={}},h.prototype.key=function(s){return s=parseInt(s,10)||0,this._keys[s]},Object.defineProperty&&Object.defineProperty(h.prototype,"length",{get:function(){return this._keys.length}});let l;const d=Date.now().toString();try{if(l=window.localStorage,l.setItem(d,d),l.getItem(d)!==d)throw Error("localStorage behaved unexpectedly");return l.removeItem(d),l}catch(s){console.warn(s),console.warn("localStorage failed, falling back on sessionStorage");try{if(l=window.sessionStorage,l.setItem(d,d),l.getItem(d)!==d)throw Error("sessionStorage behaved unexpectedly");return l.removeItem(d),l}catch(p){return console.warn(p),console.warn("sessionStorage failed, falling back on memory storage"),new h}}}).call(E,r,E,T),u!==void 0&&(T.exports=u)}}]);

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.