summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authortim b <timb@camcompu.home>2010-08-13 12:51:38 -0700
committertim b <timb@camcompu.home>2010-08-13 12:51:38 -0700
commit9aa082265b7664f0bc1e5732bce939114b7227d3 (patch)
tree401ada371d515e5758ba9d7b7db4e1a29490e26e /static
parent5e2a18fe3c9940cf1e0a94d9e3c932c2ef6cee24 (diff)
clean up fullscreen source
Diffstat (limited to 'static')
-rw-r--r--static/js/fullscreen.js60
1 files changed, 24 insertions, 36 deletions
diff --git a/static/js/fullscreen.js b/static/js/fullscreen.js
index 2de2d76..2cce5a1 100644
--- a/static/js/fullscreen.js
+++ b/static/js/fullscreen.js
@@ -21,42 +21,30 @@ function displayImage(){
}
function refresh() {
- var onSuccess = function(json) {
- try {
- if (json.messages && json.messages.length)
- scanMessagesForImages(json.messages)
-
- Timestamp = json.timestamp;
-
-/*
- var messages = $.grep(
- json.messages,
- function(m) { return !isDuplicateMessage(m) });
- updateUI(messages, json.users, json.favs);
- if (typeof UnseenMsgCounter !== 'undefined' && !HasFocus) {
- UnseenMsgCounter += messages.length;
- }
-*/
- } catch(e) {
-// if (window.console) {
-// console.error(e);
-// }
- }
- setTimeout(refresh, 1000);
- };
+ var onSuccess = function(json) {
+ try {
+ if (json.messages && json.messages.length)
+ scanMessagesForImages(json.messages);
+ Timestamp = json.timestamp;
+ } catch(e) {
+
+ }
+
+ setTimeout(refresh, 1000);
+ };
- var onError = function(resp, textStatus, errorThrown) {
- setTimeout(refresh, 1000);
- };
+ var onError = function(resp, textStatus, errorThrown) {
+ setTimeout(refresh, 1000);
+ };
- $.ajax({
- type: 'GET',
- timeout: 5000,
- url: '/refresh',
- data: { 'room': Room, 'since': Timestamp },
- cache: false,
- dataType: 'json',
- success: onSuccess,
- error: onError
- });
+ $.ajax({
+ type: 'GET',
+ timeout: 5000,
+ url: '/refresh',
+ data: { 'room': Room, 'since': Timestamp },
+ cache: false,
+ dataType: 'json',
+ success: onSuccess,
+ error: onError
+ });
} \ No newline at end of file