I can tell u what runFunction() is, I just simplified it for a better understanding.
Because what I just to replace is this condition if( $.inArray( parseInt(ajaxify.data.cid, 10) , CategoriesIds) != -1) instead of going search if the current category is on the array CategoriesIds above (hardcoded), I need to check if the current category is on the selection made by the user on the plugin config page.

And I'm not realizing how I make that connection between the plugin settings and the function.

I already have the list with all categories, but now I want the function I have in the /static/lib/main.js file to run only on the categories I selected on the plugin settings page (those settings are stored in the /library.js file).

Can I do this or do I have to move that function to the /library.js file too?

static/lib/main.js:

"use strict";
$(window).on('action:ajaxify.end', function(ev) {
var CategoriesIds = [28,29];
// I want to change this to fetch the categories selected from the plugin's settings page
// instead of using the array above, to prevent the user having to modify the plugin files
// to change the ID of the categories
if( $.inArray( parseInt(ajaxify.data.cid, 10) , CategoriesIds) != -1){
runFunction();
}
});

@its-brad You can install nodebb-plugin-custom-pages and config it like this:

Then go to ACP -> Extend -> Widgets and look for home.tpl to customize it your way with all the widgets you want.
Then go to ACP -> General -> Homepage and choose this new page to be your homepage (in this example the custom path will be /home).
And it's done.

I think this is the only way to do what you want. This is a great plugin too if you want to extend your forum pages and it is not heavy at all.

Once you publish this "global" topic, you will not be able to edit it with just one click. You will have to individually go to all categories and edit manually... There may even be a workaround for this but it's too complex for me to develop alone and I'm not seeing a way to be able to edit the created topic in all categories at once.

And I still don't know if I can get the composer to work with the plugin, so I do not promise to get a writing through the NodeBB composer. If I can not, you will have to write the topic body manually (this implies that the user knows Markdown syntax).

@its-brad You can install nodebb-plugin-custom-pages and config it like this:

Then go to ACP -> Extend -> Widgets and look for home.tpl to customize it your way with all the widgets you want.
Then go to ACP -> General -> Homepage and choose this new page to be your homepage (in this example the custom path will be /home).
And it's done.

I think this is the only way to do what you want. This is a great plugin too if you want to extend your forum pages and it is not heavy at all.