mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
closes #1641
This commit is contained in:
@@ -283,6 +283,10 @@ middleware.renderHeader = function(req, res, callback) {
|
|||||||
next(err, tree ? tree.toCSS({cleancss: true}) : '');
|
next(err, tree ? tree.toCSS({cleancss: true}) : '');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
customJS: function(next) {
|
||||||
|
templateValues.useCustomJS = parseInt(meta.config.useCustomJS, 10) === 1;
|
||||||
|
next(null, templateValues.useCustomJS ? meta.config.customJS : '');
|
||||||
|
},
|
||||||
title: function(next) {
|
title: function(next) {
|
||||||
if (uid) {
|
if (uid) {
|
||||||
user.getSettings(uid, function(err, settings) {
|
user.getSettings(uid, function(err, settings) {
|
||||||
@@ -314,6 +318,7 @@ middleware.renderHeader = function(req, res, callback) {
|
|||||||
templateValues.isAdmin = results.isAdmin || false;
|
templateValues.isAdmin = results.isAdmin || false;
|
||||||
templateValues.user = results.user;
|
templateValues.user = results.user;
|
||||||
templateValues.customCSS = results.customCSS;
|
templateValues.customCSS = results.customCSS;
|
||||||
|
templateValues.customJS = results.customJS;
|
||||||
|
|
||||||
app.render('header', templateValues, callback);
|
app.render('header', templateValues, callback);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user