aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/utils.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/utils.js b/lib/utils.js
index ca7ce2bc..3a355d7b 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -156,10 +156,13 @@ var utils = {
return utils.createFullUrl(str);
else
return utils.createSearchUrl(str);
- },
-
+ }
};
+/* Execute a function with the given value for "this". Equivalent to jQuery.proxy(). */
+Function.prototype.proxy = function(fn, self) { return function() { fn.apply(self, arguments); }; };
+
+
/*
* Simple JavaScript Inheritance, by John Resig.
* This provides a short syntax for organizing code into classes.