]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#159] twitter uses @ instead of from: in the twitter source
authorScottDowne <sdowne@learn.senecac.on.ca>
Mon, 20 Dec 2010 19:41:48 +0000 (14:41 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Mon, 20 Dec 2010 19:41:48 +0000 (14:41 -0500)
plugins/twitter/popcorn.twitter.html
plugins/twitter/popcorn.twitter.js

index 3dd09ac3596f96c063da76f8fdc017484965544d..2d9990e7ba239e223072e20aeeadf82e5cd1854c 100644 (file)
@@ -13,7 +13,7 @@
         start: 5, // seconds
         end: 15, // seconds
         title: 'Steve Song',
-        source: 'from:stevesong',
+        source: '@stevesong',
         target: 'twitterdiv',
       } )
       .twitter({
index 9eb5c8295cca85d86bba3ad352690964655a9ffe..0f2bc4decf1004bc1cde39cd6c162e8bf8884a3a 100644 (file)
@@ -19,7 +19,7 @@
         .twitter({
           start:          5,                // seconds, mandatory
           end:            15,               // seconds, mandatory
-          source:         'from:stevesong', // mandatory
+          source:         '@stevesong', // mandatory
           title:          'title',          // optional
           subject:        'subject',        // optional
           height:         200,              // optional
@@ -39,7 +39,7 @@
         document.getElementById( options.target ).appendChild( options.container ); // add the widget's div to the target div
 
         // setup info for the widget
-        var source  = options.source || "",
+        var source  = options.source.replace(/^@/, "from:") || "",
             title   = options.title || null,
             subject   = options.subject || null,
             width = options.width || 250,