PageSourceSearch

https://onemoremini.fr/assets/forum/account-categories.2262069c0574887ddf54.min.js

js onemoremini.fr collected 2026-09-24 11:18:17 UTC 12,638 bytes, 1 lines download raw bytes

1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[4884,38747,97082],{49859(h,v,u){"use strict";var y,f;y=[u(67910),u(29930),u(49897)],f=(function(m,t,a){const n={};n.init=function(){m.init(),ajaxify.data.categories.forEach(function(o){e(o.cid)}),$('[component="category/watch/all"]').find('[component="category/watching"], [component="category/tracking"], [component="category/ignoring"], [component="category/notwatching"]').on("click",async o=>{const c=[],s=o.currentTarget.getAttribute("data-state"),{uid:i}=ajaxify.data;$('[data-parent-cid="0"]').each(function(l,p){c.push($(p).attr("data-cid"))});let d=await Promise.all(c.map(async l=>a.put(`/categories/${l}/watch`,{state:s,uid:i})));d=d.reduce((l,p)=>l.concat(p.modified),[]).filter((l,p,w)=>w.indexOf(l)===p),r(d,s)})};function e(o){$('[data-cid="'+o+'"]').find('[component="category/watching"], [component="category/tracking"], [component="category/ignoring"], [component="category/notwatching"]').on("click",async s=>{const i=s.currentTarget.getAttribute("data-state"),{uid:d}=ajaxify.data,{modified:l}=await a.put(`/categories/${o}/watch`,{state:i,uid:d});r(l,i),t.success("[[category:"+i+".message]]")})}function r(o,c){o.forEach(function(s){const i=$('[data-cid="'+s+'"]');i.find('[component="category/watching/menu"]').toggleClass("hidden",c!=="watching"),i.find('[component="category/watching/check"]').toggleClass("fa-check",c==="watching"),i.find('[component="category/tracking/menu"]').toggleClass("hidden",c!=="tracking"),i.find('[component="category/tracking/check"]').toggleClass("fa-check",c==="tracking"),i.find('[component="category/notwatching/menu"]').toggleClass("hidden",c!=="notwatching"),i.find('[component="category/notwatching/check"]').toggleClass("fa-check",c==="notwatching"),i.find('[component="category/ignoring/menu"]').toggleClass("hidden",c!=="ignoring"),i.find('[component="category/ignoring/check"]').toggleClass("fa-check",c==="ignoring")})}return n}).apply(v,y),f!==void 0&&(h.exports=f)},67910(h,v,u){"use strict";var y,f;y=[u(36684),u(72254),u(52473),u(17459),u(47283),u(28061),u(7524),u(49897),u(65303),u(29930)],f=(function(m,t,a,n,e,r,o,c,s,i){const d={};let l;d.init=function(){l=ajaxify.data.isAdmin||ajaxify.data.isSelf||ajaxify.data.isGlobalModerator,p(),l&&w(),a.get("account/follow").on("click",()=>A("follow")),a.get("account/unfollow").on("click",()=>A("unfollow")),a.get("account/chat").on("click",async function(){const{roomId:g}=await c.get(`/users/${encodeURIComponent(ajaxify.data.uid)}/chat`),b=await app.require("chat");g?b.openChat(g):b.newChat(ajaxify.data.uid)}),a.get("account/new-chat").on("click",async function(){(await app.require("chat")).newChat(ajaxify.data.uid,function(){a.get("account/chat").parent().removeClass("hidden")})}),a.get("account/ban").on("click",()=>r.banAccount(ajaxify.data.theirid)),a.get("account/mute").on("click",()=>r.muteAccount(ajaxify.data.theirid)),a.get("account/unban").on("click",()=>r.unbanAccount(ajaxify.data.theirid)),a.get("account/unmute").on("click",()=>r.unmuteAccount(ajaxify.data.theirid)),a.get("account/delete-account").on("click",()=>e.account(ajaxify.data.theirid)),a.get("account/delete-content").on("click",()=>e.content(ajaxify.data.theirid)),a.get("account/delete-all").on("click",()=>e.purge(ajaxify.data.theirid)),a.get("account/flag").on("click",C),a.get("account/already-flagged").on("click",D),a.get("account/block").on("click",()=>k("block")),a.get("account/unblock").on("click",()=>k("unblock"))};function p(){$('[component="profile/change/picture"]').on("click",function(){return o.openChangeModal(),!1})}function w(){m.init(a.get("account/cover"),function(g,b,x){socket.emit("user.updateCover",{uid:ajaxify.data.uid,imageData:g,position:b},x)},function(){t.show({title:"[[user:upload-cover-picture]]",socketMethod:"user.updateCover",aspectRatio:NaN,allowSkippingCrop:!0,restrictImageDimension:!1,paramName:"uid",paramValue:ajaxify.data.theirid,accept:".png,.jpg,.bmp"},function(g){g=(g.startsWith("http")?"":config.relative_path)+g+"?"+Date.now(),a.get("account/cover").css("background-image","url("+g+")")})},j)}function A(g){if(!app.user.uid){let x;return utils.isNumber(ajaxify.data.uid)?x=config.url+"/user/"+ajaxify.data.uid:x=ajaxify.data.userslug,u.e(91722).then(u.bind(u,91722)).then(({trigger:E})=>{E("follow",{object:x})}),!1}const b=isFinite(ajaxify.data.uid)?ajaxify.data.uid:encodeURIComponent(ajaxify.data.userslug);return c[g==="follow"?"put":"del"]("/users/"+b+"/follow",void 0,function(x){if(x)return i.error(x);a.get("account/follow").toggleClass("hide",g==="follow"),a.get("account/unfollow").toggleClass("hide",g==="unfollow"),i.success("[[global:alert."+g+", "+ajaxify.data.username+"]]")}),!1}function C(){u.e(6574).then(function(){var g=[u(6574)];(function(b){b.showFlagModal({type:"user",id:ajaxify.data.uid})}).apply(null,g)}).catch(u.oe)}function D(){const g=$(this).data("flag-id");u.e(6574).then(function(){var b=[u(6574)];(function(x){s.confirm("[[flags:modal-confirm-rescind]]",function(E){E&&x.rescind(g)})}).apply(null,b)}).catch(u.oe)}function k(g){return socket.emit("user.toggleBlock",{blockeeUid:ajaxify.data.uid,blockerUid:app.user.uid,action:g},function(b,x){if(b)return i.error(b);a.get("account/block").toggleClass("hidden",x),a.get("account/unblock").toggleClass("hidden",!x)}),!1}function j(){s.confirm("[[user:remove-cover-picture-confirm]]",function(g){g&&socket.emit("user.removeCover",{uid:ajaxify.data.uid},function(b){b?i.error(b):ajaxify.refresh()})})}return d}).apply(v,y),f!==void 0&&(h.exports=f)},47283(h,v,u){"use strict";var y,f;y=[u(49897),u(65303),u(29930)],f=(function(m,t,a){const n={};n.account=function(r,o){e(r,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",o)},n.content=function(r,o){e(r,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",o)},n.purge=function(r,o){e(r,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",o)};function e(r,o,c,s,i){t.confirm(o,function(d){d&&m.del(`/users/${encodeURIComponent(r)}${c}`,{}).then(()=>
1{if(a.success(s),typeof i=="function")return i()}).catch(a.error)})}return n}).apply(v,y),f!==void 0&&(h.exports=f)},28061(h,v,u){"use strict";var y,f;y=[u(49897),u(65303),u(29930),u(81335)],f=(function(m,t,a,n){const e={};e.banAccount=function(o,c){o=o||ajaxify.data.theirid,r({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(s){m.put("/users/"+encodeURIComponent(o)+"/ban",{until:s.until,reason:s.reason||""}).then(()=>{if(typeof c=="function")return c();ajaxify.refresh()}).catch(a.error)}})},e.unbanAccount=function(o){r({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(c){m.del("/users/"+encodeURIComponent(o)+"/ban",{reason:c.reason||""}).then(()=>{ajaxify.refresh()}).catch(a.error)}})},e.muteAccount=function(o,c){o=o||ajaxify.data.theirid,r({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(s){m.put("/users/"+o+"/mute",{until:s.until,reason:s.reason||""}).then(()=>{if(typeof c=="function")return c();ajaxify.refresh()}).catch(a.error)}})},e.unmuteAccount=function(o){r({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(c){m.del("/users/"+o+"/mute",{reason:c.reason||""}).then(()=>{ajaxify.refresh()}).catch(a.error)}})};async function r(o){const c=await socket.emit("user.getCustomReasons",{type:o.type||""}),s=await n.render(o.tpl,{reasons:c}),i=await t.dialog({title:o.title,message:s,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:o.title,callback:function(){const d=i.find("form").serializeArray().reduce(function(l,p){return l[p.name]=p.value,l},{});if(Object.hasOwn(d,"length")){const p=parseInt(d.unit,10)?24:1;d.until=d.length>0?Date.now()+d.length*36e5*p:0}else d.until=0;o.onSubmit(d)}}}});return i.find("[data-key]").on("click",function(){const d=c.find(l=>String(l.key)===$(this).attr("data-key"));d&&d.body&&i.find('[name="reason"]').val(d.body)}),i}return e.throwModal=r,e}).apply(v,y),f!==void 0&&(h.exports=f)},36684(h,v,u){"use strict";var y,f;y=[u(29930),u(18675)],f=(function(m){const t={coverEl:null,saveFn:null};t.init=function(n,e,r,o){t.coverEl=n,t.saveFn=e,n.find(".upload").on("click",r),n.find(".resize").on("click",function(){a(n)}),n.find(".remove").on("click",o),n.on("dragover",t.onDragOver).on("drop",t.onDrop),n.find(".save").on("click",t.save),n.addClass("initialised")},t.onDragOver=function(n){n.stopPropagation(),n.preventDefault(),n.originalEvent.dataTransfer.dropEffect="copy"},t.onDrop=function(n){n.stopPropagation(),n.preventDefault();const e=n.originalEvent.dataTransfer.files,r=new FileReader;e.length&&e[0].type.match("image.*")&&(r.onload=function(o){t.coverEl.css("background-image","url("+o.target.result+")"),t.newCover=o.target.result}
1,r.readAsDataURL(e[0]),a(t.coverEl))};function a(n){n.toggleClass("active",1).backgroundDraggable({axis:"y",units:"percent"}),m.alert({alert_id:"drag_start",title:"[[modules:cover.dragging-title]]",message:"[[modules:cover.dragging-message]]",timeout:5e3})}return t.save=function(){t.coverEl.addClass("saving"),t.saveFn(t.newCover||void 0,t.coverEl.css("background-position"),function(n){n?m.error(n):(t.coverEl.toggleClass("active",0),t.coverEl.backgroundDraggable("disable"),t.coverEl.off("dragover",t.onDragOver),t.coverEl.off("drop",t.onDrop),m.success("[[modules:cover.saved]]")),t.coverEl.removeClass("saving")})},t}).apply(v,y),f!==void 0&&(h.exports=f)},18675(){(function(h){var v=h(window),u=function(t,a,n,e){if(arguments.length===3||e){if(n<t)return t;if(n>a)return a}return n},y=function(t){t.clientX=t.originalEvent.touches[0].clientX,t.clientY=t.originalEvent.touches[0].clientY},f=function(t){var a=(t.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1];if(a){var n={width:0,height:0},e=new Image;return e.onload=function(){if(t.css("background-size")=="cover"){var r=t.innerWidth(),o=t.innerHe
1ight(),c=r/o,s=e.width/e.height,i=1;s>=c?i=o/e.height:i=r/e.width,n.width=e.width*i,n.height=e.height*i}else n.width=e.width,n.height=e.height},e.src=a,n}};function m(t,a){this.element=t,this.options=a,this.init()}m.prototype.init=function(){var t=h(this.element),a=(t.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1],n=this.options;if(a){var e={width:0,height:0};(n.bound||n.units=="percent")&&(e=f(t)),h(window).on("keydown.dbg",r=>{var o=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],c=parseInt(o[1])||0,s=parseInt(o[2])||0;n.units=="percent"&&(c=Math.round(c/-200*e.width),s=Math.round(s/-200*e.height));var i=0,d=0;return r.which===37?i=-5:r.which===39?i=5:r.which===38?d=-5:r.which===40&&(d=5),n.units==="percent"?(c=n.axis==="y"?c:u(-e.width/2,0,c+i,n.bound),s=n.axis==="x"?s:u(-e.height/2,0,s+d,n.bound),t.css("background-position",c/e.width*-200+"% "+s/e.height*-200+"%")):(c=n.axis==="y"?c:u(t.innerWidth()-e.width,0,c+i,n.bound),s=n.axis==="x"?s:u(t.innerHeight()-e.height,0,s+d,n.bound)),[37,38,39,40].includes(r.which)?!1:void 0}),t.on("mousedown.dbg touchstart.dbg",function(r){if(r.target===t[0]){if(r.preventDefault(),r.originalEvent.touches)y(r);else if(r.which!==1)return;var o=r.clientX,c=r.clientY,s=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],i=parseInt(s[1])||0,d=parseInt(s[2])||0;n.units=="percent"&&(i=Math.round(i/-200*e.width),d=Math.round(d/-200*e.height)),v.on("mousemove.dbg touchmove.dbg",function(l){l.preventDefault(),l.originalEvent.touches&&y(l);var p=l.clientX,w=l.clientY;n.units=="percent"?(i=n.axis==="y"?i:u(-e.width/2,0,i+p-o,n.bound),d=n.axis==="x"?d:u(-e.height/2,0,d+w-c,n.bound),t.css("background-position",i/e.width*-200+"% "+d/e.height*-200+"%")):(i=n.axis==="y"?i:u(t.innerWidth()-e.width,0,i+p-o,n.bound),d=n.axis==="x"?d:u(t.innerHeight()-e.height,0,d+w-c,n.bound),t.css("background-position",i+"px "+d+"px")),o=p,c=w}),v.on("mouseup.dbg touchend.dbg mouseleave.dbg",function(){n.done&&n.done(),v.off("mousemove.dbg touchmove.dbg"),v.off("mouseup.dbg touchend.dbg mouseleave.dbg")})}})}},m.prototype.disable=function(){var t=h(this.element);t.off("mousedown.dbg touchstart.dbg"),v.off("mousemove.dbg touchmove.dbg mouseup.dbg touchend.dbg mouseleave.dbg keydown.dbg")},h.fn.backgroundDraggable=function(t){var a=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=h(this),e;typeof t>"u"||typeof t=="object"?(t=h.extend({},h.fn.backgroundDraggable.defaults,t),e=new m(this,t),n.data("dbg",e)):typeof t=="string"&&n.data("dbg")&&(e=n.data("dbg"),m.prototype[t].apply(e,a))})},h.fn.backgroundDraggable.defaults={bound:!0,axis:void 0,units:"pixels"}})(jQuery)}}]);

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.