javascriptEnabled set to true
-
Hey Community,
is it possible to set javascriptEnabled to true, through a custom build plugin, without touching the following lines:
async function saveRenderedCss(data) { if (!data.customCSS) { return; } const less = require('less'); const lessObject = await less.render(data.customCSS, { compress: true, javascriptEnabled: false, }); data.renderedCustomCSS = lessObject.css; }
Is there a configOption or hook, which can change it?
Thanks in advance!
-
@tobiasdossinger The real question here is why you need javascript enabled...
I am 95% certain you came here because maybe a theme of yours you have suddenly stopped working, with a cryptic error about turning
javascriptEnabled
on, yes?In that case, you may want to audit your theme and figure out what exactly needs javascript in your LESS... there really is no reason to that I have come across... although I could be mistaken.
In Persona's case, it was the
.opacity()
mixin, which was not required anymore, as opacity is well supported cross-browser now: https://github.com/NodeBB/nodebb-theme-persona/commit/e14d38b827591c9681a5fcd43ca4b206297eaff5