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