summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/slx-fixes.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/script/slx-fixes.js b/script/slx-fixes.js
index be35f56b..e8380702 100644
--- a/script/slx-fixes.js
+++ b/script/slx-fixes.js
@@ -108,11 +108,17 @@ $(document).ready(function() {
});
// Caching script fetcher (https://api.jquery.com/jQuery.getScript/); use exactly like $.getScript
-jQuery.cachedScript = function(url, options) {
+jQuery.cachedScript = function(url, callback, options) {
+ if (!$.isFunction(callback)) {
+ options = callback;
+ callback = undefined;
+ }
options = $.extend( options || {}, {
+ type: "get",
dataType: "script",
cache: true,
- url: url
+ url: url,
+ success: callback
});
return jQuery.ajax( options );
};