From 15085fc6ae48f34638e0525c29a08669ad371913 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sun, 4 Aug 2013 11:44:48 -0400 Subject: [PATCH] Minor fixes for v2.2 - If NO_WEBSOCKETS or USEROPTS.altsocket are true, don't use websockets - Base resizing on an invisible div (some channels remove/hide #queue) - Names are properly italicized when AFK --- package.json | 2 +- server.js | 2 +- www/assets/js/callbacks.js | 4 ++-- www/assets/js/data.js | 6 ++---- www/assets/js/ui.js | 2 +- www/channel.html | 4 ++++ 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 0aaf3ede..14f0a403 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "2.2.3", + "version": "2.2.4", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/server.js b/server.js index 34dffed7..9d458163 100644 --- a/server.js +++ b/server.js @@ -6,7 +6,7 @@ var Logger = require("./logger"); var Channel = require("./channel"); var User = require("./user"); -const VERSION = "2.2.3"; +const VERSION = "2.2.4"; function getIP(req) { var raw = req.connection.remoteAddress; diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index f5ae5fc2..688cda76 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -672,7 +672,7 @@ Callbacks = { if(data.afk) { $("").addClass("icon-time") .appendTo(users[i].children[0]); - $(users[i].children[1]).css("font-style", ""); + $(users[i].children[1]).css("font-style", "italic"); } } } @@ -1111,7 +1111,7 @@ setupCallbacks = function() { $.getScript(IO_URL+"/socket.io/socket.io.js", function() { try { - if(NO_WEBSOCKETS) { + if(NO_WEBSOCKETS || USEROPTS.altsocket) { var i = io.transports.indexOf("websocket"); if(i >= 0) io.transports.splice(i, 1); diff --git a/www/assets/js/data.js b/www/assets/js/data.js index 491239b1..b8797caf 100644 --- a/www/assets/js/data.js +++ b/www/assets/js/data.js @@ -37,10 +37,8 @@ var CHANNEL = { var PLAYER = false; var VIDEOQUALITY = false; var FLUIDLAYOUT = false; -if($("#ytapiplayer").length > 0) { - var VWIDTH = $("#ytapiplayer").parent().css("width").replace("px", ""); - var VHEIGHT = ""+parseInt(parseInt(VWIDTH) * 9 / 16); -} +var VWIDTH = $("#videowidth").css("width").replace("px", ""); +var VHEIGHT = ""+parseInt(parseInt(VWIDTH) * 9 / 16); var MEDIA = { hash: "" }; var PL_MOVING = false; var PL_ADDING = false; diff --git a/www/assets/js/ui.js b/www/assets/js/ui.js index f1c5eee9..369a1701 100644 --- a/www/assets/js/ui.js +++ b/www/assets/js/ui.js @@ -340,7 +340,7 @@ $("#shuffleplaylist").click(function() { /* layout stuff */ $(window).resize(function() { - VWIDTH = $("#queue").css("width").replace("px", ""); + VWIDTH = $("#videowidth").css("width").replace("px", ""); VHEIGHT = ""+parseInt(parseInt(VWIDTH) * 9 / 16); $("#messagebuffer").css("height", (VHEIGHT - 31) + "px"); $("#userlist").css("height", (VHEIGHT - 31) + "px"); diff --git a/www/channel.html b/www/channel.html index 68d063f5..b13822dd 100644 --- a/www/channel.html +++ b/www/channel.html @@ -207,6 +207,10 @@ +
+
+
+