PageSourceSearch

https://brownsboard.com/assets/forum/topic-change-owner.2f037efcf98e0103e74f.min.js

js brownsboard.com collected 2026-10-09 22:41:47 UTC 10,326 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1091,2067,3097,3417,3602,4271,7205,7212,8314,8395,9127,9897],{7205(x,_,d){var h,p;h=[d(6227),d(4405),d(9930),d(9897)],p=(function(a,r,l,E){const w={};let u,P,y=0;w.init=function(g){u||app.parseAndTranslate("modals/change-owner",{},function(m){u=m,P=u.find("#change_owner_commit"),$("body").append(u),u.find("#change_owner_cancel").on("click",c),u.find("#username").on("keyup",e),a.init(n,{allowMainPostSelect:!0}),M(),g&&a.togglePostSelection(g,g.attr("data-pid")),P.on("click",function(){f()}),r.user(u.find("#username"),{filters:["notbanned"]},function(o,s){y=s.item.user.uid,e()})})};function M(){a.pids.length?u.find("#pids").translateText("[[topic:fork-pid-count, "+a.pids.length+"]]"):u.find("#pids").translateText("[[topic:fork-no-pids]]")}function e(){y&&u.find("#username").length&&u.find("#username").val().length&&a.pids.length?P.removeAttr("disabled"):P.attr("disabled",!0)}function n(){e(),M()}function f(){y&&E.post("/posts/owner",{pids:a.pids,uid:y}).then(()=>{ajaxify.go(`/post/${a.pids[0]}`),c()}).catch(l.error)}function c(){u&&(u.remove(),u=null,a.disable())}return w}).apply(_,h),p!==void 0&&(x.exports=p)},9897(x,_,d){d.r(_),d.d(_,{del:()=>g,get:()=>M,head:()=>e,patch:()=>f,post:()=>n,put:()=>c});var h=d(1749),p=d.n(h),a=d(5303),r=d(7459),l=d.n(r),E=d(8636),w=d.n(E);const u=config.relative_path+"/api/v3";async function P(o,s){if(o.url=o.url.startsWith("/api")?config.relative_path+o.url:u+o.url,o.headers=o.headers||{},o.headers["x-return-to"]||(o.headers["x-return-to"]=`${window.location.pathname.slice(config.relative_path.length)}${window.location.search}`),typeof s=="function"){y(o).then(t=>s(null,t),t=>s(t));return}try{return await y(o)}catch(t){if(t.status===401){const{url:i}=await(0,h.fire)("filter:admin.reauth",{url:"login"}),D=await r.translate("[[error:api.reauth-required]]",config.userLang);(0,a.confirm)(D,A=>{A&&(E.setItem("location-hash",window.location.hash),ajaxify.go(i))})}throw t}}async function y(o){const{url:s}=o;delete o.url,o.data&&!(o.data instanceof FormData)&&(o.data=JSON.stringify(o.data||{}),o.headers["content-type"]="application/json; charset=utf-8"),{options:o}=await(0,h.fire)("filter:api.options",{options:o}),o.data&&(o.body=o.data,delete o.data);const t=await fetch(s,o),{headers:i}=t;if(i.get("x-redirect"))return y({url:i.get("x-redirect"),...o});const D=i.get("content-type"),A=D&&D.startsWith("application/json");let O;if(o.method!=="HEAD"&&(A?O=await t.json():O=await t.text()),!t.ok){let v=t.statusText;if(O){const C=A&&(O.status?.message||O.error||""),T=typeof O=="string"?O:t.statusText||`[[error:api.${t.status}]]`;v=A&&C?C:T}const I=new Error(v);throw I.status=t.status,I}return A&&O&&O.hasOwnProperty("status")&&O.hasOwnProperty("response")?O.response:O}function M(o,s,t){return P({url:o+(s&&Object.keys(s).length?"?"+$.param(s):"")},t)}function e(o,s,t){return P({url:o+(s&&Object.keys(s).length?"?"+$.param(s):""),method:"HEAD"},t)}function n(o,s,t,i){return m("POST",o,s,t,i)}function f(o,s,t,i){return m("PATCH",o,s,t,i)}function c(o,s,t,i){return m("PUT",o,s,t,i)}function g(o,s,t,i){return m("DELETE",o,s,t,i)}function m(o,s,t,i,D){return typeof i=="function"&&(D=i,i={}),P({url:s,method:o,data:t,headers:{"x-csrf-token":config.csrf_token,...i}},D)}},4405(x,_,d){var h,p;h=[d(9897),d(9930),d(6e3),d(9787),d(5786)],p=(function(a,r,{Textcomplete:l},{TextareaEditor:E},{ContenteditableEditor:w}){const u={},P={delay:200,appendTo:null};u.init=e=>{const n={...P,...e},{input:f,onSelect:c}=n;app.loadJQueryUI(function(){f.autocomplete({position:y(),...n,open:function(){$(this).autocomplete("widget").css("z-index",100005)},select:function(g,m){M(f,c,g,m)}})})},u.user=function(e,n,f){typeof n=="function"&&(f=n,n={}),n=n||{},u.init({input:e,onSelect:f,source:(c,g)=>{n.query=c.term,a.get("/api/users",n,function(m,o){if(m)return r.error(m);if(o&&o.users){const s=o.users.map(function(t){return t&&{label:t.username,value:t.username,user:{uid:t.uid,name:t.username,slug:t.userslug,username:t.username,userslug:t.userslug,displayname:t.displayname,picture:t.picture,banned:t.banned,"icon:text":t["icon:text"],"icon:bgColor":t["icon:bgColor"]}}});g(s)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},u.group=function(e,n){u.init({input:e,onSelect:n,source:(f,c)=>{a.get("/groups",{query:f.term},function(g,m){if(g)return r.error(g);if(m&&m.groups.length){const o=m.groups.map(function(s){return s&&{label:s.name,value:s.name,group:s}});c(o)}$(".ui-autocomplete a").attr("data-ajaxify","false")})}})},u.tag=function(e,n){u.init({input:e,onSelect:n,delay:100,source:(f,c)=>{socket.emit("topics.autocompleteTags",{query:f.term,cid:ajaxify.data.cid||0},function(g,m){if(g)return r.error(g);m&&c(m),$(".ui-autocomplete a").attr("data-ajaxify","false")})}})};function y(){const e=document.querySelector("html").getAttribute("data-dir")==="rtl"?"right":"left";return{my:`${e} top`,at:`${e} bottom`,collision:"none"}}function M(e,n,f,c){n=n||function(){};const g=jQuery.Event("keypress");g.which=13,g.keyCode=13,setTimeout(function(){e.trigger(g)},100),n(f,c)}return u.setup=function({element:e,strategies:n,options:f}){const c=e.get(0);if(!c)return;let g;if(c.nodeName==="TEXTAREA"||c.nodeName==="INPUT"?g=new E(c):c.nodeName==="DIV"&&c.getAttribute("contenteditable")==="true"&&(g=ne
1w w(c)),!g)throw new Error("unknown target element type");c.setAttribute("dir",document.querySelector("html").getAttribute("data-dir"));const m=new l(g,n,{dropdown:f});return m.on("rendered",function(){m.dropdown.items.length&&m.dropdown.items[0].activate()}),m},u}).apply(_,h),p!==void 0&&(x.exports=p)},5303(x,_,d){d.r(_),d.d(_,{alert:()=>E,confirm:()=>w,dialog:()=>l,prompt:()=>u,promptPassword:()=>P});var h=d(3530),p=d.n(h),a=d(7459),r=d.n(a);h.setDefaults({locale:config.userLang}),a.translateKeys(["modules:bootbox.ok","modules:bootbox.cancel","modules:bootbox.confirm"]).then(e=>{h.addLocale(config.userLang,{OK:e[0],CANCEL:e[1],CONFIRM:e[2]}),h.setLocale(config.userLang)});async function l(e){const[n,f,c]=await Promise.all([a.translate(e.title||""),y(e)||"",M(e.buttons)]);return h.dialog({...e,title:n,message:f,buttons:c})}async function E(e,n){const[f,c]=await Promise.all([e&&e.title?a.translate(e.title):null,y(e)]);return n=typeof n=="function"?n:e.callback,h.alert({...e,title:f,message:c,callback:n})}async function w(e,n){const[f,c]=await Promise.all([e&&e.title?a.translate(e.title):null,y(e)]);return n=typeof n=="function"?n:e.callback,h.confirm({...e,title:f,message:c,callback:n})}async function u(e,n){const[f,c]=await Promise.all([a.translate(typeof e=="string"?e:e.title),e&&e.message?y(e):null]);return n=typeof n=="function"?n:e.callback,h.prompt({...e,title:f,message:c,callback:n})}async function P(e){return typeof e=="string"&&(e={title:e}),e=e||{title:"[[user:current-password]]",message:"[[user:emailUpdate.password-challenge]]"},await new Promise(n=>{u({...e,inputType:"password",required:!0,value:"",callback:n})})}function y(e){const n=e&&e.message?e.message:e;return n instanceof jQuery?n:a.translate(n||"")}async function M(e){if(!Object.keys(e||{}).length)return;const n=Object.values(e);return await Promise.all(n.map(async f=>({...f,label:await a.translateKey(f.label)})))}},6227(x,_,d){var h,p;h=[d(2473)],p=(function(a){const r={};let l;r.pids=[];let E=!1,w;r.init=function(t,i){r.pids.length=0,w=null,l=t,i=i||{},E=i.allowMainPostSelect||!1,$("#content").on("click",'[component="topic"] [component="post"]',u),$("#content").on("selectstart",'[component="topic"] [component="post"]',P),o()};function u(t){t.stopPropagation();const i=$(this).attr("data-pid");n($(this))&&(t.shiftKey&&w&&w!==i?M(i):r.togglePostSelection(f(i),i),w=i)}function P(t){t.shiftKey&&t.preventDefault()}r.disable=function(){r.pids.forEach(function(t){a.get("post","pid",t).toggleClass("selected",!1)}),$("#content").off("click",'[component="topic"] [component="post"]',u),$("#content").off("selectstart",'[component="topic"] [component="post"]',P),s()},r.togglePostSelection=function(t,i){i&&(y(i,r.pids.indexOf(i)===-1,t),e())};function y(t,i,D){const A=r.pids.indexOf(t);i!==(A!==-1)&&(i?r.pids.push(t):r.pids.splice(A,1),(D||f(t)).toggleClass("selected",i))}function M(t){const i=c(),D=g(i,w),A=g(i,t);if(D===-1||A===-1){r.togglePostSelection(f(t),t);return}const O=r.pids.indexOf(t)===-1;i.slice(Math.min(D,A),Math.max(D,A)+1).each(function(){y($(this).attr("data-pid"),O,$(this))}),e()}function e(){r.pids.length&&r.pids.sort(function(t,i){return t-i}),typeof l=="function"&&l()}function n(t){return E||parseInt(t.attr("data-index"),10)!==0}function f(t){return $('[component="topic"] [data-pid="'+t+'"]')}function c(){return $('[component="topic"] [component="post"]').filter(function(){return n($(this))})}function g(t,i){return t.index(t.filter('[data-pid="'+i+'"]').first())}function m(){return!1}function o(){$("#content").on("click",'[component="post"] button, [component="post"] a',m)}function s(){$("#content").off("click",'[component="post"] button, [component="post"] a',m)}return r}).apply(_,h),p!==void 0&&(x.exports=p)},8636(x,_,d){var h;h=(function(){function p(){this._store={},this._keys=[]}p.prototype.isMock=!0,p.prototype.setItem=function(l,E){l=String(l),this._keys.indexOf(l)===-1&&this._keys.push(l),this._store[l]=E},p.prototype.getItem=function(l){return l=String(l),this._keys.indexOf(l)===-1?null:this._store[l]},p.prototype.removeItem=function(l){l=String(l),this._keys=this._keys.filter(function(E){return E!==l}),this._store[l]=null},p.prototype.clear=function(){this._keys=[],this._store={}},p.prototype.key=function(l){return l=parseInt(l,10)||0,this._keys[l]},Object.defineProperty&&Object.defineProperty(p.prototype,"length",{get:function(){return this._keys.length}});let a;const r=Date.now().toString();try{if(a=window.localStorage,a.setItem(r,r),a.getItem(r)!==r)throw Error("localStorage behaved unexpectedly");return a.removeItem(r),a}catch(l){console.warn(l),console.warn("localStorage failed, falling back on sessionStorage");try{if(a=window.sessionStorage,a.setItem(r,r),a.getItem(r)!==r)throw Error("sessionStorage behaved unexpectedly");return a.removeItem(r),a}catch(E){return console.warn(E),console.warn("sessionStorage failed, falling back on memory storage"),new p}}}
1).call(_,d,_,x),h!==void 0&&(x.exports=h)}}]);

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.