summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/slx-fixes.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/script/slx-fixes.js b/script/slx-fixes.js
index 06453ca0..be35f56b 100644
--- a/script/slx-fixes.js
+++ b/script/slx-fixes.js
@@ -106,3 +106,13 @@ $(document).ready(function() {
}
slxCheckCallbacks();
});
+
+// Caching script fetcher (https://api.jquery.com/jQuery.getScript/); use exactly like $.getScript
+jQuery.cachedScript = function(url, options) {
+ options = $.extend( options || {}, {
+ dataType: "script",
+ cache: true,
+ url: url
+ });
+ return jQuery.ajax( options );
+};