]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#159] tightened up twitter widget a bit more
authorScottDowne <sdowne@learn.senecac.on.ca>
Thu, 23 Dec 2010 18:41:28 +0000 (13:41 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Thu, 23 Dec 2010 18:41:28 +0000 (13:41 -0500)
plugins/twitter/popcorn.twitter.js

index ed1df8ffe30eefe0fd71a03cfb7663aa4a773805..ba4bcbe0f67df71bb7f41d744ff54f27a291393f 100644 (file)
@@ -61,7 +61,6 @@
             hash    = /^#/.test( src ),
             widgetOptions = {
               version: 2,
-              type: ( profile ? 'profile' : 'search' ),
               id: options.container.getAttribute( 'id' ),  // use this id to connect it to the div
               rpp: 30,
               width: width,
         // create widget
         if ( profile ) {
 
+          widgetOptions.type = "profile";
+
           new TWTR.Widget( widgetOptions ).render().setUser( src ).start();
 
         } else if ( hash ) {
 
+          widgetOptions.type = "search";
           widgetOptions.search = src;
           widgetOptions.subject = src;