Yes, it is this plugin : https://github.com/nodebb/nodebb-plugin-global-chat
Some night, tongues are loosened, and it seems to be interesting to keep a "short history" (such as 24h) of the global chat.
exports.filterComposerFormatting = function(payload, callback) {
payload.options.push({
className: 'add-movie-source fa fa-video-camera',
name: 'add_movie_source',
title: 'Add movie source',
});
payload.options.push({
className: 'add-movie-review fa fa-video-camera',
name: 'add_movie_review',
title: 'Add movie review',
});
payload.options.push({
className: 'add-game-source fa fa-gamepad',
name: 'add_game_source',
title: 'Add game source',
});
payload.options.push({
className: 'add-game-review fa fa-gamepad',
name: 'add_game_review',
title: 'Add game review',
});
callback(null, payload);
};
exports.filterComposerFormatting = async function(payload, callback) {
payload.options.push({
className: 'add-movie-source fa fa-video-camera',
name: 'add_movie_source',
title: 'Add movie source',
});
payload.options.push({
className: 'add-movie-review fa fa-video-camera',
name: 'add_movie_review',
title: 'Add movie review',
});
payload.options.push({
className: 'add-game-source fa fa-gamepad',
name: 'add_game_source',
title: 'Add game source',
});
payload.options.push({
className: 'add-game-review fa fa-gamepad',
name: 'add_game_review',
title: 'Add game review',
});
return payload;
};
client.js
in the scripts
section of your plugin.json
.If you want to catch the activate/minimize/discard events - you can listen to these events:
@antosik there actually is a way: you can define the stuff you want imported on composer launch as a requirejs module and require
it in a script that does get included in the bundle.
The "modules"
field in plugin.json can be used to defined requirejs module that are not bundled into the initial payload.
I fixed it this way
exports.filterComposerFormatting = async (data) => {
data.options.push({
className: 'add-movie-source fa fa-video-camera',
name: 'add_movie_source',
title: 'Add movie source'
},
{
className: 'add-movie-review fa fa-video-camera',
name: 'add_movie_review',
title: 'Add movie review'
},
{
className: 'add-game-source fa fa-gamepad',
name: 'add_game_source',
title: 'Add game source'
},
{
className: 'add-game-review fa fa-gamepad',
name: 'add_game_review',
title: 'Add game review'
});
return data;
};
@baris any example for a noob like me? I just want to load client.js when composer is active due to that it only is needed when working it the composer