PageSourceSearch

https://mistarg.cn/assets/admin/plugins-spam-be-gone.2fbb833ecbc9e323e430.min.js

js mistarg.cn collected 2026-10-06 13:18:09 UTC 7,879 bytes, 1 lines download raw bytes

1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[18470,30451],{44069(A,S,f){A.exports=f(17418)},70012(A,S,f){"use strict";var R,h;R=[f(91749),f(29930)],h=(function(C,m){let v=[],p=0;function c(n,t){typeof n!="string"&&(n=$(n),n=n.data("type")||n.attr("type")||n.prop("tagName"));const i=a.plugins[n.toLowerCase()];if(i==null)return;const e=i[t];return typeof e=="function"?e:null}const r={deepClone:function(n){return typeof n=="object"?JSON.parse(JSON.stringify(n)):n},createElement:function(n,t,i){const e=document.createElement(n);for(const[s,o]of Object.entries(t))e.setAttribute(s,o);return i&&e.appendChild(document.createTextNode(i)),e},initElement:function(n){const t=c(n,"init");t?.call(a,$(n))},destructElement:function(n){const t=c(n,"destruct");t?.call(a,$(n))},createElementOfType:function(n,t,i){let e;const s=c(n,"create");return s!=null?e=$(s.call(a,n,t,i)):(i==null&&(i={}),n!=null&&(i.type=n),e=$(r.createElement(t||"input",i))),e.data("type",n),r.initElement(e),e},cleanArray:function(n,t,i){const e=[];if(!t&&i)return n;for(let s=0;s<n.length;s+=1){let o=n[s];t&&(o===!!o?o=+o:o&&typeof o.trim=="function"&&(o=o.trim())),(i||o!=null&&o.length)&&e.push(o)}return e},isTrue:function(n){return n==="true"||+n==1},isFalse:function(n){return n==="false"||+n==0},readValue:function(n){let t=!r.isFalse(n.data("empty"));const i=!r.isFalse(n.data("trim")),e=n.data("split"),s=c(n,"get");let o;if(s!=null)return s.call(a,n,i,t);if(e!=null){t=r.isTrue(n.data("empty")),o=n.val();const d=o!=null&&o.split(e||",")||[];return r.cleanArray(d,i,t)}if(o=n.val(),i&&o!=null&&typeof o.trim=="function"&&(o=o.trim()),t||o!==void 0&&(o==null||o.length!==0))return o},fillField:function(n,t){const i=c(n,"set");let e=n.data("trim");if(e=e!=="false"&&+e!=0,i!=null)return i.call(a,n,t,e);t instanceof Array&&(t=t.join(n.data("split")||(e?", ":","))),e&&t&&typeof t.trim=="function"?(t=t.trim(),typeof t.toString=="function"&&(t=t.toString())):t!=null?(typeof t.toString=="function"&&(t=t.toString()),e&&(t=t.trim())):t="",t!==void 0&&n.val(t)},initFields:function(n){$("[data-key]",n).each(function(t,i){i=$(i);const e=c(i,"init"),s=i.data("key").split(".");let o=a.get();e?.call(a,i);for(let d=0;d<s.length;d+=1){const l=s[d];l&&o!=null&&(o=o[l])}r.fillField(i,o)})},registerReadyJobs:function(n){return p+=n,p},beforeReadyJobsDecreased:function(n){if(n==null&&(n=1),p>0&&(p-=n,p<=0)){for(let t=0;t<v.length;t+=1)v[t]();v=[]}},whenReady:function(n){p<=0?n():v.push(n)},serializeForm:function(n){const t=n.serializeObject();return n.find('input[type="checkbox"]').each(function(i,e){e=$(e),e.is(":checked")||(t[e.attr("name")]="off")}),n.find("select[multiple]").each(function(i,e){e=$(e),t[e.attr("name")]=JSON.stringify(e.val())}),t},persistSettings:function(n,t,i,e){t!=null&&t._!=null&&typeof t._!="string"&&(t=r.deepClone(t),t._=JSON.stringify(t._)),socket.emit("admin.settings.set",{hash:n,values:t},function(s){i&&(s?m.alert({title:"[[admin/admin:changes-not-saved]]",type:"danger",message:`[[admin/admin/changes-not-saved-message, ${s.message}]]`,timeout:5e3}):m.alert({title:"[[admin/admin:changes-saved]]",type:"success",message:"[[admin/admin:changes-saved-message]]",timeout:2500})),typeof e=="function"&&e(s)})},use:function(n){try{n._=JSON.parse(n._)}catch(t){console.error(t)}a.cfg=n}},a={helper:r,plugins:{},cfg:{},get:function(){return a.cfg!=null&&a.cfg._!==void 0?a.cfg._:a.cfg},registerPlugin:function(n,t){t==null?t=n.types:n.types=t,typeof n.use=="function"&&n.use.call(a);for(let i=0;i<t.length;i+=1){const e=t[i].toLowerCase();a.plugins[e]==null&&(a.plugins[e]=n)}},set:function(n,t,i,e,s){s==null&&(s=!0),r.whenReady(function(){r.use(t),r.initFields(i||"form"),r.persistSettings(n,t,s,e)})},sync:function(n,t,i){socket.emit("admin.settings.get",{hash:n},function(e,s){e?typeof i=="function"&&i(e):r.whenReady(function(){r.use(s),r.initFields(t||"form"),typeof i=="function"&&i()})})},persist:function(n,t,i,e){const s=[],o=$("[data-key]",t||"form").toArray();e==null&&(e=!0);for(let d=0;d<o.length;d+=1){const l=$(o[d]),g=r.readValue(l);let u=a.get();const y=l.data("key").split("."),D=y[y.length-1];if(y.length>1)for(let k=0;k<y.length-1;k+=1){const F=y[k];F&&u!=null&&(u=u[F])}u!=null?g!=null?u[D]=g:delete u[D]:s.push(l.data("key"))}s.length&&m.alert({title:"Attributes Not Saved",message:"'"+s.join(", ")+"' could not be saved. Please contact the plugin-author!",type:"danger",timeout:5e3}),r.persistSettings(n,a.cfg,e,i)},load:function(n,t,i){i=i||function(){};const e=t.attr("data-socket-get");socket.emit(e||"admin.settings.get",{hash:n},function(s,o){if(s)return i(s);$(t).find("select[multiple]").each(function(l,g){const u=$(g).attr("name");if(u&&o.hasOwnProperty(u))try{o[u]=JSON.parse(o[u])}catch(y){console.error(y)}}),ajaxify.data[e?n:"settings"]=o,r.whenReady(function(){$(t).find("[data-sorted-list]").each(function(l,g){c(g,"get").call(a,$(g),n)})}),$(t).deserialize(o),C.fire("action:admin.settingsLoaded"),$(t).on("change","input, select, textarea",function(){app.flags=app.flags||{},app.flags._unsaved=!0});const d=document.getElementById("save");d&&f.e(6411).then(function(){var l=[f(6411)];(function(g){g.bind("ctrl+s",function(u){d.click(),u.preventDefault()})}).apply(null,l)}).catch(f.oe),i(null,o)})},save:function(n,t,i){t=$(t);const e=t.get(0).elements;if(a.check(e)&&t.length){const o=r.serializeForm(t);r.whenReady(function(){const l=t.find("[data-sorted-list]");l.length&&l.each((g,u)=>{c(u,"set").call(a,$(u),o)})});const d=t.attr("data-socket-set");socket.emit(d||"admin.settings.set",{hash:n,values:o},function(l){if(app.flags._unsaved=!1,ajaxify.data[d?n:"settings"]=o,typeof i=="function")i(l);else if(l)m.alert({title:"[[admin/admin:changes-not-saved]]",message:`[[admin/admin:changes-not-saved-message, ${l.message}]]`,type:"error",timeout:5e3});else{const g=document.getElementById("save");g.classList.toggle("saved",!0),setTimeout(()=>{g.classList.toggle("saved",!1)},1500)}})}},check:function(n){const t=i=>{const e=i.target.closest(".form-group");e&&e.classList.add("has-error"),i.target.removeEventListener("invalid",t)};return Array.prototype.map.call(n,i=>{const e=i.closest(".form-group");return e&&e.classList.remove("has-error"),i.addEventListener("invalid",t),i.reportValidity()}).every(Boolean)}};return r.registerReadyJobs(1),Promise.all([f.e(23662),f.e(65285),f.e(19308)]).then(function(){var n=[f(75210),f(474),f(50397),f(71575),f(40054),f(17708),f(46700),f(59175)];(function(){for(let t=0;t<arguments.length;t+=1)a.registerPlugin(arguments[t]);r.beforeReadyJobsDecreased()}).apply(null,n)}).catch(f.oe),a}
1).apply(S,R),h!==void 0&&(A.exports=h)},17418(A,S,f){"use strict";var R,h;R=[f(70012),f(29930),f(17459)],h=(function(C,m,v){var p={};return p.init=function(){var c=$(".acp-page-container");v.translate(c.html(),function(r){c.html(r),p.initSettings()})},p.initSettings=function(){var c=ajaxify.data.nbbId,r=c+"-settings",a=$("."+r);function n(t){var i=$(t.target),e=a.find(i.attr("data-toggle-target"));e.prop("disabled",!i.is(":checked"))}a.find('input[type="checkbox"][data-toggle-target]').on("change",n),C.load(c,a,function(){a.find('input[type="checkbox"][data-toggle-target]').each(function(){n({target:this})})}),$("#save").on("click",function(t){t.preventDefault(),a.find(".has-error").removeClass("has-error");var i="",e=0;a.find('input[type="checkbox"][data-toggle-target]').each(function(s,o){o=$(o),o.is(":checked")&&!a.find(o.attr("data-toggle-target")).val()&&(i+=(e++?", ":"")+o.attr("data-toggle-target"))}),i?(a.find(i).each(function(s,o){o=$(o),o.parent().addClass("has-error")}),m.error("Empty fields not allowed!")):C.save(c,a,function(){m.alert({type:"success",alert_id:c,title:"Reload Required",message:"Please reload your NodeBB to have your changes take effect",clickfn:function(){socket.emit("admin.reload")}})})})},p}).apply(S,R),h!==void 0&&(A.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.