client/compteur.html
changeset 10 dd7d86fbee70
child 13 e42d9f11f6e2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/compteur.html	Mon Feb 20 17:44:20 2012 +0100
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8" />
+        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+        <title>Bubble-TV</title>
+        <meta name="description" content="" />
+        <link rel="stylesheet" href="css/base-metric.css" />
+        <style type="text/css">
+            #container {
+                width: 300px;
+                height: 300px;
+                margin: 200px auto;
+                padding: 100px;
+                background: #0031ff;
+                color: #fff;
+            }
+            h1 {
+                font-size: 24px;
+            }
+            h2 {
+                font-size: 48px; font-weight: bold; margin: 20px 0;
+            }
+        </style>
+
+        <script type="text/javascript" src="lib/jquery.min.js"></script>
+        <script type="text/javascript" src="lib/protoclass.js"></script>              
+        <script type="text/javascript" src="lib/box2d.js"></script>
+        <script type="text/javascript" src="js/tweetanim.js"></script>
+        <script type="text/javascript" src="js/tweetvote-anim.js"></script>     
+        <script type="text/javascript" src="js/podium.js"></script>
+        <script type="text/javascript" src="js/tweetsource.js"></script>
+        <script type="text/javascript">
+            /* Heure de début de l'émission
+            var startHour = new Date("Feb 24 2012 23:30:00 UTC+0100"); 
+             * */
+            var startHour = new Date() - 120000;
+            
+            /* Mots-clés pour déclencher la recherche
+            var searchKeywords = [ '#lgw', '#legrandwebze', 'webze' ]; 
+             * */
+            var searchKeywords = ['Sarkozy', 'Hollande', 'Bayrou'];
+            
+            $(function() {
+                
+                myTweetSource = new Btv_TweetSource({
+                    keywords: searchKeywords
+                });
+                
+                myTweetSource.setOnNewTweets(function() {
+                    var _filtered = this.afterDate(startHour);
+                    $("#nbtweets").html(_filtered.count());
+                });
+            });
+        </script>
+    </head>
+    <body>
+        <div id="container">
+            <h1>Total des tweets #LGW</h1>
+            <h2 id="nbtweets"></h2>
+        </div>
+
+    </body>
+</html>