Skip to content

Commit

Permalink
Minor fixes for v2.2
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
calzoneman committed Aug 4, 2013
1 parent 20f0d1c commit 15085fc
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions www/assets/js/callbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ Callbacks = {
if(data.afk) {
$("<i/>").addClass("icon-time")
.appendTo(users[i].children[0]);
$(users[i].children[1]).css("font-style", "");
$(users[i].children[1]).css("font-style", "italic");
}
}
}
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions www/assets/js/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion www/assets/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 4 additions & 0 deletions www/channel.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ <h1 id="drinkcount"></h1>
</div>
</div>
</div>
<div class="row" id="resizewrap">
<div class="span5"></div>
<div class="span7" id="videowidth"></div>
</div>
</div>
<div class="push"></div>
<div id="sitefooter">
Expand Down

0 comments on commit 15085fc

Please sign in to comment.