framework/extensions/akismet/js/dist/forum.js
flarum-bot 3757bde4fc Bundled output for commit f67ca5782a
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2023-06-07 10:45:14 +00:00

2 lines
1.2 KiB
JavaScript
Generated

(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const o=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var a=t.n(r);const n=flarum.core.compat["forum/utils/PostControls"];var s=t.n(n);const l=flarum.core.compat["forum/components/Post"];var m=t.n(l);a().initializers.add("flarum-akismet",(()=>{(0,o.extend)(s(),"destructiveControls",(function(t,e){if(t.has("approve")){const o=e.flags();if(o&&o.some((t=>"akismet"===(null==t?void 0:t.type())))){const e=t.get("approve");e&&"object"==typeof e&&"children"in e&&(e.children=a().translator.trans("flarum-akismet.forum.post.not_spam_button"))}}})),(0,o.override)(m().prototype,"flagReason",(function(t,e){return"akismet"===e.type()?a().translator.trans("flarum-akismet.forum.post.akismet_flagged_text"):t(e)}))}))})(),module.exports=e})();
//# sourceMappingURL=forum.js.map