aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--node_modules/montage/ui/youtube-channel.reel/youtube-channel.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js b/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js
index fd642290..3e20c406 100644
--- a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js
+++ b/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js
@@ -77,9 +77,22 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, {
77 // create url 77 // create url
78 var url = "http://gdata.youtube.com/feeds/api/users/" + this._channel + "/uploads?v=2&alt=json-in-script&callback=" + callbackName; 78 var url = "http://gdata.youtube.com/feeds/api/users/" + this._channel + "/uploads?v=2&alt=json-in-script&callback=" + callbackName;
79 79
80 var script = document.createElement("script"); 80 this.script = document.createElement("script");
81 script.src = url; 81 this.script.src = url;
82 this._element.appendChild(script); 82 this.needsDraw = true;
83 }
84 },
85
86 script: {
87 value: null
88 },
89
90 draw: {
91 value: function() {
92 if (this.script) {
93 this._element.appendChild(this.script);
94 this.script = null;
95 }
83 } 96 }
84 }, 97 },
85 98