1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-30 22:48:30 +00:00

3.5.78 to 3.5.83. It's been so long since I've commited. I'm a bad person. Added grouping for hosted channels, and a menu to select which channel you visit. Added weights for selecting which socket server to use. Added server time offset calculations. Refactored a LOT of how chat badges and chat line rendering and history processing works behind the scenes. Removed a ton of duplicate code. Added basic adjacent chat message lookups. Need better server support.

This commit is contained in:
SirStendec 2015-11-19 02:45:56 -05:00
parent a050063c81
commit c167a8b626
28 changed files with 1501 additions and 538 deletions

View file

@ -600,10 +600,12 @@ FFZ.prototype._modify_cindex = function(view) {
this._ffz_update_uptime = setTimeout(this.ffzUpdateUptime.bind(this), 1000);
// Determine when the channel last went live.
var online = this.get("controller.content.stream.created_at");
var online = this.get("controller.content.stream.created_at"),
now = Date.now() - (f._ws_server_offset || 0);
online = online && utils.parse_date(online);
var uptime = online && Math.floor((Date.now() - online.getTime()) / 1000) || -1;
var uptime = online && Math.floor((now - online.getTime()) / 1000) || -1;
if ( uptime < 0 ) {
var el = this.get('element').querySelector('#ffz-uptime-display');
if ( el )