mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
remove version and environment from config
This commit is contained in:
@@ -211,11 +211,6 @@ $(document).ready(function () {
|
||||
$(window).trigger('action:ajaxify.contentLoaded', { url: url, tpl: tpl_url });
|
||||
|
||||
app.processPage();
|
||||
|
||||
var timeElapsed = Date.now() - ajaxifyTimer;
|
||||
if (config.environment === 'development' && !isNaN(timeElapsed)) {
|
||||
console.info('[ajaxify /' + url + '] Time elapsed:', timeElapsed + 'ms');
|
||||
}
|
||||
};
|
||||
|
||||
ajaxify.parseData = function () {
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
function loadClient(language, namespace) {
|
||||
return Promise.resolve(jQuery.getJSON(config.relative_path + '/assets/language/' + language + '/' + namespace + '.json?' + config['cache-buster']));
|
||||
}
|
||||
var warn = function () {};
|
||||
if (typeof config === 'object' && config.environment === 'development') {
|
||||
warn = console.warn.bind(console);
|
||||
}
|
||||
var warn = console.warn;
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as a named module
|
||||
define('translator', [], function () {
|
||||
|
||||
@@ -17,9 +17,7 @@ var apiController = module.exports;
|
||||
|
||||
apiController.loadConfig = function (req, callback) {
|
||||
var config = {};
|
||||
config.environment = process.env.NODE_ENV;
|
||||
config.relative_path = nconf.get('relative_path');
|
||||
config.version = nconf.get('version');
|
||||
config.siteTitle = validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB'));
|
||||
config.browserTitle = validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB'));
|
||||
config.titleLayout = (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}');
|
||||
|
||||
Reference in New Issue
Block a user