aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--youtubeamp.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/youtubeamp.js b/youtubeamp.js
index 21bd18f..1ab8833 100644
--- a/youtubeamp.js
+++ b/youtubeamp.js
@@ -42,8 +42,7 @@
(function() {
-Function.prototype.bind = function(object) {
- var __method = this;
+let bind = function(__method, object) {
return function() {
return __method.apply(object, arguments);
};
@@ -56,7 +55,7 @@ function YouTubePlayerController() {
}
YouTubePlayerController.prototype = {
initialize: function() {
- this.fuller = this._changeToFull.bind(this);
+ this.fuller = bind(this._changeToFull, this);
},
constants: {