@ -327,6 +327,7 @@ ajaxify = window.ajaxify || {};
require(['translator', 'benchpress'], function (translator, Benchpress) {
translator.translate('[[error:no-connection]]');
Benchpress.registerLoader(ajaxify.loadTemplate);
Benchpress.setGlobal('config', config);
});
}());
@ -15,22 +15,6 @@ app.cacheBuster = null;
var registerMessage = params.register;
var isTouchDevice = utils.isTouchDevice();
require(['benchpress'], function (Benchpress) {
if (Object.defineProperty) {
Object.defineProperty(window, 'templates', {
configurable: true,
enumerable: true,
get: function () {
console.warn('[deprecated] Accessing benchpress (formerly known as templates.js) globally is deprecated. Use `require(["benchpress"], function (Benchpress) { ... })` instead');
return Benchpress;
},
} else {
window.templates = Benchpress;
}
app.cacheBuster = config['cache-buster'];
bootbox.setDefaults({