Added user custom extension

This commit is contained in:
benweet 2013-07-08 00:49:19 +01:00
parent 8b2300573e
commit a04bedc6d7

View File

@ -5,6 +5,7 @@ define([
"classes/Extension",
"settings",
"text!html/settingsExtensionsAccordion.html",
"extensions/userCustom",
"extensions/googleAnalytics",
"extensions/dialogAbout",
"extensions/dialogManagePublication",
@ -26,7 +27,6 @@ define([
"extensions/buttonHtmlCode",
"extensions/buttonMarkdownSyntax",
"extensions/buttonViewer",
"extensions/userCustom",
"libs/bootstrap",
"libs/jquery.waitforimages"
], function($, _, utils, Extension, settings, settingsExtensionsAccordionHTML) {
@ -54,7 +54,13 @@ define([
}
var callbackArguments = arguments;
_.each(callbackList, function(callback) {
callback.apply(null, callbackArguments);
// In case user custom callback contains error
try {
callback.apply(null, callbackArguments);
}
catch(e) {
console.error(e);
}
});
};
}