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", "classes/Extension",
"settings", "settings",
"text!html/settingsExtensionsAccordion.html", "text!html/settingsExtensionsAccordion.html",
"extensions/userCustom",
"extensions/googleAnalytics", "extensions/googleAnalytics",
"extensions/dialogAbout", "extensions/dialogAbout",
"extensions/dialogManagePublication", "extensions/dialogManagePublication",
@ -26,7 +27,6 @@ define([
"extensions/buttonHtmlCode", "extensions/buttonHtmlCode",
"extensions/buttonMarkdownSyntax", "extensions/buttonMarkdownSyntax",
"extensions/buttonViewer", "extensions/buttonViewer",
"extensions/userCustom",
"libs/bootstrap", "libs/bootstrap",
"libs/jquery.waitforimages" "libs/jquery.waitforimages"
], function($, _, utils, Extension, settings, settingsExtensionsAccordionHTML) { ], function($, _, utils, Extension, settings, settingsExtensionsAccordionHTML) {
@ -54,7 +54,13 @@ define([
} }
var callbackArguments = arguments; var callbackArguments = arguments;
_.each(callbackList, function(callback) { _.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);
}
}); });
}; };
} }