Browse Source

remove poller (1cae243)

raylu 14 years ago
parent
commit
ca337013d7
1 changed files with 0 additions and 32 deletions
  1. 0 32
      static/poller.js

+ 0 - 32
static/poller.js

@@ -1,32 +0,0 @@
-importScripts('/static/jquery.hive.pollen.min.js');
-
-var pid;
-var timestamp = '0';
-
-function getUpdates() {
-	$.ajax.get({
-		url: '/poll/',
-		dataType: 'json',
-		data: {pid: pid, timestamp: timestamp},
-		success: handleUpdates
-	});
-}
-function handleUpdates(data) {
-	var updates = [];
-	for (var i = 0; i < data.length; i++) {
-		updates.push({
-			'action': data[i].Action,
-			'yid': data[i].Song.Yid,
-			'title': data[i].Song.Title,
-			'user': data[i].Song.User
-		});
-		timestamp = data[i].Timestamp;
-	}
-	$.send({updates: updates});
-	getUpdates();
-}
-
-$(function (data) {
-	pid = data.pid;
-	getUpdates();
-});