aboutsummaryrefslogtreecommitdiffstats
path: root/youtubeamp.js
diff options
context:
space:
mode:
authoranekos2011-11-08 03:09:32 +0900
committeranekos2011-11-08 03:09:32 +0900
commitd0dfb6055e9a17ea1b81b6226d4a40c6462a0781 (patch)
tree03c695541363927a0dbe541339acda314dc0cf73 /youtubeamp.js
parentc5181971191ebf7f3b0f4da555980e3e7cc9b4a4 (diff)
downloadvimperator-plugins-d0dfb6055e9a17ea1b81b6226d4a40c6462a0781.tar.bz2
Should not redefine global object's property
Diffstat (limited to 'youtubeamp.js')
-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: {