Is it possible to override client side javascript from my plugin?
-
For example, I want to change how the topic scroller works, but the javascript is here:
NodeBB/public/src/modules/navigator.js at 0e4fc531e006c3dd2c5fa402e90b20309cc3a1e6 · NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/public/src/modules/navigator.js at 0e4fc531e006c3dd2c5fa402e90b20309cc3a1e6 · NodeBB/NodeBB
GitHub (github.com)
I know I can create a totally fresh scroller and add my own functions, but I was wondering if there is a way I could override some of the navigator functions
-
You should be able to overwrite a core module completely using your plugins
modules
section. For example to overwrite the navigator module with your own you can do."modules": { "navigator": "public/navigator.js" },
Copy the navigator module from core and make your changes and it will replace the core module during build.
Copyright © 2024 NodeBB | Contributors