PageSourceSearch

https://mistarg.cn/assets/forum/account-tags.49667f91307446e598a3.min.js

js mistarg.cn collected 2026-10-06 13:16:47 UTC 14,210 bytes, 1 lines download raw bytes

1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1852,4884,97082],{67910(y,x,u){"use strict";var b,g;b=[u(36684),u(72254),u(52473),u(17459),u(47283),u(28061),u(7524),u(49897),u(65303),u(29930)],g=(function(p,t,r,n,e,i,c,s,d,a){const o={};let f;o.init=function(){f=ajaxify.data.isAdmin||ajaxify.data.isSelf||ajaxify.data.isGlobalModerator,l(),f&&h(),r.get("account/follow").on("click",()=>v("follow")),r.get("account/unfollow").on("click",()=>v("unfollow")),r.get("account/chat").on("click",async function(){const{roomId:m}=await s.get(`/users/${encodeURIComponent(ajaxify.data.uid)}/chat`),A=await app.require("chat");m?A.openChat(m):A.newChat(ajaxify.data.uid)}),r.get("account/new-chat").on("click",async function(){(await app.require("chat")).newChat(ajaxify.data.uid,function(){r.get("account/chat").parent().removeClass("hidden")})}),r.get("account/ban").on("click",()=>i.banAccount(ajaxify.data.theirid)),r.get("account/mute").on("click",()=>i.muteAccount(ajaxify.data.theirid)),r.get("account/unban").on("click",()=>i.unbanAccount(ajaxify.data.theirid)),r.get("account/unmute").on("click",()=>i.unmuteAccount(ajaxify.data.theirid)),r.get("account/delete-account").on("click",()=>e.account(ajaxify.data.theirid)),r.get("account/delete-content").on("click",()=>e.content(ajaxify.data.theirid)),r.get("account/delete-all").on("click",()=>e.purge(ajaxify.data.theirid)),r.get("account/flag").on("click",D),r.get("account/already-flagged").on("click",C),r.get("account/block").on("click",()=>E("block")),r.get("account/unblock").on("click",()=>E("unblock"))};function l(){$('[component="profile/change/picture"]').on("click",function(){return c.openChangeModal(),!1})}function h(){p.init(r.get("account/cover"),function(m,A,w){socket.emit("user.updateCover",{uid:ajaxify.data.uid,imageData:m,position:A},w)},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(m){m=(m.startsWith("http")?"":config.relative_path)+m+"?"+Date.now(),r.get("account/cover").css("background-image","url("+m+")")})},R)}function v(m){if(!app.user.uid){let w;return utils.isNumber(ajaxify.data.uid)?w=config.url+"/user/"+ajaxify.data.uid:w=ajaxify.data.userslug,u.e(91722).then(u.bind(u,91722)).then(({trigger:j})=>{j("follow",{object:w})}),!1}const A=isFinite(ajaxify.data.uid)?ajaxify.data.uid:encodeURIComponent(ajaxify.data.userslug);return s[m==="follow"?"put":"del"]("/users/"+A+"/follow",void 0,function(w){if(w)return a.error(w);r.get("account/follow").toggleClass("hide",m==="follow"),r.get("account/unfollow").toggleClass("hide",m==="unfollow"),a.success("[[global:alert."+m+", "+ajaxify.data.username+"]]")}),!1}function D(){u.e(6574).then(function(){var m=[u(6574)];(function(A){A.showFlagModal({type:"user",id:ajaxify.data.uid})}).apply(null,m)}).catch(u.oe)}function C(){const m=$(this).data("flag-id");u.e(6574).then(function(){var A=[u(6574)];(function(w){d.confirm("[[flags:modal-confirm-rescind]]",function(j){j&&w.rescind(m)})}).apply(null,A)}).catch(u.oe)}function E(m){return socket.emit("user.toggleBlock",{blockeeUid:ajaxify.data.uid,blockerUid:app.user.uid,action:m},function(A,w){if(A)return a.error(A);r.get("account/block").toggleClass("hidden",w),r.get("account/unblock").toggleClass("hidden",!w)}),!1}function R(){d.confirm("[[user:remove-cover-picture-confirm]]",function(m){m&&socket.emit("user.removeCover",{uid:ajaxify.data.uid},function(A){A?a.error(A):ajaxify.refresh()})})}return o}).apply(x,b),g!==void 0&&(y.exports=g)},43930(y,x,u){"use strict";var b,g;b=[u(67910),u(29930),u(49897),u(91749),u(34405)],g=(function(p,t,r,n,e){const i={};return i.init=function(){p.init();const c=$('[component="tags/watch"]');c.tagsinput({tagClass:"badge rounded-1",confirmKeys:[13,44],trimValue:!0}),c.siblings(".bootstrap-tagsinput").addClass("tag-list");const d=c.siblings(".bootstrap-tagsinput").find("input");d.translateAttr("aria-label","[[aria:user-watched-tags]]"),e.tag(d),ajaxify.data.tags.forEac
1h(function(a){c.tagsinput("add",a)}),c.on("itemAdded",function(a){d.length&&d.autocomplete("close"),r.put(`/tags/${a.item}/follow`,{}).then(()=>{t.alert({alert_id:"follow_tag",message:"[[tags:following-tag.message]]",type:"success",timeout:5e3}),n.fire("action:tags.changeWatching",{tag:ajaxify.data.tag,type:"follow"})}).catch(o=>t.error(o))}),c.on("itemRemoved",function(a){r.del(`/tags/${a.item}/follow`,{}).then(()=>{t.alert({alert_id:"follow_tag",message:"[[tags:not-following-tag.message]]",type:"info",timeout:5e3}),n.fire("action:tags.changeWatching",{tag:ajaxify.data.tag,type:"unfollow"})}).catch(o=>t.error(o))})},i}).apply(x,b),g!==void 0&&(y.exports=g)},47283(y,x,u){"use strict";var b,g;b=[u(49897),u(65303),u(29930)],g=(function(p,t,r){const n={};n.account=function(i,c){e(i,"[[user:delete-this-account-confirm]]","/account","[[user:account-deleted]]",c)},n.content=function(i,c){e(i,"[[user:delete-account-content-confirm]]","/content","[[user:account-content-deleted]]",c)},n.purge=function(i,c){e(i,"[[user:delete-all-confirm]]","","[[user:account-deleted]]",c)};function e(i,c,s,d,a){t.confirm(c,function(o){o&&p.del(`/users/${encodeURIComponent(i)}${s}`,{}).then(()=>{if(r.success(d),typeof a=="function")return a()}).catch(r.error)})}return n}).apply(x,b),g!==void 0&&(y.exports=g)},28061(y,x,u){"use strict";var b,g;b=[u(49897),u(65303),u(29930),u(81335)],g=(function(p,t,r,n){const e={};e.banAccount=function(c,s){c=c||ajaxify.data.theirid,i({tpl:"modals/temporary-ban",title:"[[user:ban-account]]",type:"ban",onSubmit:function(d){p.put("/users/"+encodeURIComponent(c)+"/ban",{until:d.until,reason:d.reason||""}).then(()=>{if(typeof s=="function")return s();ajaxify.refresh()}).catch(r.error)}})},e.unbanAccount=function(c){i({tpl:"modals/unban",title:"[[user:unban-account]]",type:"ban",onSubmit:function(s){p.del("/users/"+encodeURIComponent(c)+"/ban",{reason:s.reason||""}).then(()=>{ajaxify.refresh()}).catch(r.error)}})},e.muteAccount=function(c,s){c=c||ajaxify.data.theirid,i({tpl:"modals/temporary-mute",title:"[[user:mute-account]]",type:"mute",onSubmit:function(d){p.put("/users/"+c+"/mute",{until:d.until,reason:d.reason||""}).then(()=>{if(typeof s=="function")return s();ajaxify.refresh()}).catch(r.error)}})},e.unmuteAccount=function(c){i({tpl:"modals/unmute",title:"[[user:unmute-account]]",onSubmit:function(s){p.del("/users/"+c+"/mute",{reason:s.reason||""}).then(()=>{ajaxify.refresh()}).catch(r.error)}})};async function i(c){const s=await socket.emit("user.getCustomReasons",{type:c.type||""}),d=await n.render(c.tpl,{reasons:s}),a=await t.dialog({title:c.title,message:d,onEscape:!0,buttons:{close:{label:"[[global:close]]",className:"btn-link"},submit:{label:c.title,callback:function(){const o=a.find("form").serializeArray().reduce(function(f,l){return f[l.name]=l.value,f},{});if(Object.hasOwn(o,"length")){const l=parseInt(o.unit,10)?24:1;o.until=o.length>0?Date.now()+o.length*36e5*l:0}else o.until=0;c.onSubmit(o)}}}});return a.find("[data-key]").on("click",function(){const o=s.find(f=>String(f.key)===$(this).attr("data-key"));o&&o.body&&a.find('[name="reason"]').val(o.body)}),a}return e.throwModal=i,e}).apply(x,b),g!==void 0&&(y.exports=g)},34405(y,x,u){"use strict";var b,g;b=[u(49897),u(29930),u(36e3),u(9787),u(35786)],g=(function(p,t,{Textcomplete:r},{TextareaEditor:n},{ContenteditableEditor:e}){const i={},c={delay:200,appendTo:null};i.init=a=>{const o={...c,...a},{input:f,onSelect:l}=o;app.loadJQueryUI(function(){f.autocomplete({position:s(),...o,open:function(){$(this).autocomplete("widget").css("z-index",100005)},select:function(h,v){d(f,l,h,v)}})})},i.user=function(a,o,f){typeof o=="function"&&(f=o,o={}),o=o||{},i.init({input:a,onSelect:f,source:(l,h)=>{o.query=l.term,p.get("/api/users",o,function(v,D){if(v)return t.error(v);if(D&&D.users){const C=D.users.map(function(E){return E&&{label:E.username,value:E.username,user:{uid:E.uid,name:E.username,slug:E.userslug,username:E.username,userslug:E.userslug,displayname:E.displayname,picture:E.picture,banned:E.banned,"icon:text":E["icon:text"],"icon:bgColor":E["icon:bgColor"]}}});h(C)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},i.group=function(a,o){i.init({input:a,onSelect:o,source:(f,l)=>{p.get("/groups",{query:f.term},function(h,v){if(h)return t.error(h);if(v&&v.groups.length){const D=v.groups.map(function(C){return C&&{label:C.name,value:C.name,group:C}
1});l(D)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},i.tag=function(a,o){i.init({input:a,onSelect:o,delay:100,source:(f,l)=>{socket.emit("topics.autocompleteTags",{query:f.term,cid:ajaxify.data.cid||0},function(h,v){if(h)return t.error(h);v&&l(v),$(".ui-autocomplete a").attr("data-ajaxify","false")})}})};function s(){const a=document.querySelector("html").getAttribute("data-dir")==="rtl"?"right":"left";return{my:`${a} top`,at:`${a} bottom`,collision:"none"}}function d(a,o,f,l){o=o||function(){};const h=jQuery.Event("keypress");h.which=13,h.keyCode=13,setTimeout(function(){a.trigger(h)},100),o(f,l)}return i.setup=function({element:a,strategies:o,options:f}){const l=a.get(0);if(!l)return;let h;if(l.nodeName==="TEXTAREA"||l.nodeName==="INPUT"?h=new n(l):l.nodeName==="DIV"&&l.getAttribute("contenteditable")==="true"&&(h=new e(l)),!h)throw new Error("unknown target element type");l.setAttribute("dir",document.querySelector("html").getAttribute("data-dir"));const v=new r(h,o,{dropdown:f});return v.on("rendered",function(){v.dropdown.items.length&&v.dropdown.items[0].activate()}),v},i}).apply(x,b),g!==void 0&&(y.exports=g)},36684(y,x,u){"use strict";var b,g;b=[u(29930),u(18675)],g=(function(p){const t={coverEl:null,saveFn:null};t.init=function(n,e,i,c){t.coverEl=n,t.saveFn=e,n.find(".upload").on("click",i),n.find(".resize").on("click",function(){r(n)}),n.find(".remove").on("click",c),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,i=new FileReader;e.length&&e[0].type.match("image.*")&&(i.onload=function(c){t.coverEl.css("background-image","url("+c.target.result+")"),t.newCover=c.target.result},i.readAsDataURL(e[0]),r(t.coverEl))};function r(n){n.toggleClass("active",1).backgroundDraggable({axis:"y",units:"percent"}),p.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?p.error(n):(t.coverEl.toggleClass("active",0),t.coverEl.backgroundDraggable("disable"),t.coverEl.off("dragover",t.onDragOver),t.coverEl.off("drop",t.onDrop),p.success("[[modules:cover.saved]]")),t.coverEl.removeClass("saving")})},t}).apply(x,b),g!==void 0&&(y.exports=g)},18675(){(function(y){var x=y(window),u=function(t,r,n,e){if(arguments.length===3||e){if(n<t)return t;if(n>r)return r}return n},b=function(t){t.clientX=t.originalEvent.touches[0].clientX,t.clientY=t.originalEvent.touches[0].clientY},g=function(t){var r=(t.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1];if(r){var n={width:0,height:0},e=new Image;return e.onload=function(){if(t.css("background-size")=="cover"){var i=t.innerWidth(),c=t.innerHeight(),s=i/c,d=e.width/e.height,a=1;d>=s?a=c/e.height:a=i/e.width,n.width=e.width*a,n.height=e.height*a}else n.width=e.width,n.height=e.height},e.src=r,n}};function p(t,r){this.element=t,this.options=r,this.init()}p.prototype.init=function(){var t=y(this.element),r=(t.css("background-image").match(/^url\(['"]?(.*?)['"]?\)$/i)||[])[1],n=this.options;if(r){var e={width:0,height:0};(n.bound||n.units=="percent")&&(e=g(t)),y(window).on("keydown.dbg",i=>{var c=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],s=parseInt(c[1])||0,d=parseInt(c[2])||0;n.units=="percent"&&(s=Math.round(s/-200*e.width),d=Math.round(d/-200*e.height));var a=0,o=0;return i.which===37?a=-5:i.which===39?a=5:i.which===38?o=-5:i.which===40&&(o=5),n.units==="percent"?(s=n.axis==="y"?s:u(-e.width/2,0,s+a,n.bound),d=n.axis==="x"?d:u(-e.height/2,0,d+o,n.bound),t.css("background-position",s/e.width*-200+"% "+d/e.height*-200+"%")):(s=n.axis==="y"?s:u(t.innerWidth()-e.width,0,s+a,n.bound),d=n.axis==="x"?d:u(t.innerHeight()-e.height,0,d+o,n.bound)),[37,38,39,40].includes(i.which)?!1:void 0}),t.on("mousedown.dbg touchstart.dbg",function(i){if(i.target===t[0]){if(i.preventDefault(),i.originalEvent.touches)b(i);else if(i.which!==1)return;var c=i.clientX,s=i.clientY,d=t.css("background-position").match(/(-?\d+).*?\s(-?\d+)/)||[],a=parseInt(d[1])||0,o=parseInt(d[2])||0;n.units=="percent"&&(a=Math.round(a/-200*e.width),o=Math.round(o/-200*e.height)),x.on("mousemove.dbg touchmove.dbg",function(f){f.preventDefault(),f.originalEvent.touches&&b(f);var l=f.clientX,h=f.clientY;n.units=="percent"?(a=n.axis==="y"?a:u(-e.width/2,0,a+l-c,n.bound),o=n.axis==="x"?o:u(-e.height/2,0,o+h-s,n.bound),t.css("background-position",a/e.width*-200+"% "+o/e.height*-200+"%")):(a=n.axis==="y"?a:u(t.innerWidth()-e.width,0,a+l-c,n.bound),o=n.axis==="x"?o:u(t.innerHe
1ight()-e.height,0,o+h-s,n.bound),t.css("background-position",a+"px "+o+"px")),c=l,s=h}),x.on("mouseup.dbg touchend.dbg mouseleave.dbg",function(){n.done&&n.done(),x.off("mousemove.dbg touchmove.dbg"),x.off("mouseup.dbg touchend.dbg mouseleave.dbg")})}})}},p.prototype.disable=function(){var t=y(this.element);t.off("mousedown.dbg touchstart.dbg"),x.off("mousemove.dbg touchmove.dbg mouseup.dbg touchend.dbg mouseleave.dbg keydown.dbg")},y.fn.backgroundDraggable=function(t){var r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=y(this),e;typeof t>"u"||typeof t=="object"?(t=y.extend({},y.fn.backgroundDraggable.defaults,t),e=new p(this,t),n.data("dbg",e)):typeof t=="string"&&n.data("dbg")&&(e=n.data("dbg"),p.prototype[t].apply(e,r))})},y.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.