Spotify media message consistency + cleanup
authorDarren <darren@darrenwhitlen.com>
Wed, 31 Dec 2014 14:50:58 +0000 (14:50 +0000)
committerDarren <darren@darrenwhitlen.com>
Wed, 31 Dec 2014 14:50:58 +0000 (14:50 +0000)
client/src/views/mediamessage.js

index 494d7b2cbede9a564ee6e663b5caff93eb626e83..cd1702f41b7cf3e6b388580dd35cb6c92e669052 100644 (file)
@@ -135,29 +135,29 @@ _kiwi.view.MediaMessage = Backbone.View.extend({
         },
 
         spotify: function () {
-            var uri = this.$el.data('uri');
-            var method = this.$el.data('method');
-            var that = this;
+            var uri = this.$el.data('uri'),
+                method = this.$el.data('method'),
+                spot, html;
 
             switch (method) {
                 case "track":
                 case "album":
-                     var spot = {
-                         url: 'https://embed.spotify.com/?uri=' + uri,
-                         width: 300,
-                         height: 80
-                     };
-                     break;
+                    spot = {
+                        url: 'https://embed.spotify.com/?uri=' + uri,
+                        width: 300,
+                        height: 80
+                    };
+                    break;
                 case "artist":
-                     var spot = {
-                         url: 'https://embed.spotify.com/follow/1/?uri=' + uri +'&size=detail&theme=dark',
-                         width: 300,
-                         height: 56
-                     };
-                     break;
-            };
-
-            var html = '<iframe src="' + spot.url + '" width="' + spot.width + '" height="' + spot.height + '" frameborder="0" allowtransparency="true"></iframe>';
+                    spot = {
+                        url: 'https://embed.spotify.com/follow/1/?uri=' + uri +'&size=detail&theme=dark',
+                        width: 300,
+                        height: 56
+                    };
+                    break;
+            }
+
+            html = '<iframe src="' + spot.url + '" width="' + spot.width + '" height="' + spot.height + '" frameborder="0" allowtransparency="true"></iframe>';
 
             return $(html);
         },