|
|
@ -1,7 +1,3 @@ |
|
|
|
Number.prototype.pad = function (len) { |
|
|
|
|
|
|
|
return (new Array(len+1).join("0") + this).slice(-len); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var weechat = angular.module('weechat', ['localStorage']); |
|
|
|
var weechat = angular.module('weechat', ['localStorage']); |
|
|
|
weechat.filter('toArray', function () { |
|
|
|
weechat.filter('toArray', function () { |
|
|
|
'use strict'; |
|
|
|
'use strict'; |
|
|
@ -275,8 +271,6 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($ |
|
|
|
var handleLine = function(line, initial) { |
|
|
|
var handleLine = function(line, initial) { |
|
|
|
var buffer_line = {} |
|
|
|
var buffer_line = {} |
|
|
|
var date = line['date']; |
|
|
|
var date = line['date']; |
|
|
|
date = new Date(parseInt(date, 10) * 1000); |
|
|
|
|
|
|
|
var datestring = date.getHours().pad(2) + ':' + date.getMinutes().pad(2); |
|
|
|
|
|
|
|
var prefix = colors.parse(line['prefix']); |
|
|
|
var prefix = colors.parse(line['prefix']); |
|
|
|
var text = colors.parse(line['message']); |
|
|
|
var text = colors.parse(line['message']); |
|
|
|
var buffer = line['buffer']; |
|
|
|
var buffer = line['buffer']; |
|
|
@ -309,7 +303,7 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($ |
|
|
|
|
|
|
|
|
|
|
|
$rootScope.buffers[buffer]['lines'].push(buffer_line); |
|
|
|
$rootScope.buffers[buffer]['lines'].push(buffer_line); |
|
|
|
|
|
|
|
|
|
|
|
buffer_line['date'] = datestring; |
|
|
|
buffer_line['date'] = date; |
|
|
|
|
|
|
|
|
|
|
|
if(!initial && (highlight || _.contains(tags_array, 'notify_private')) ) { |
|
|
|
if(!initial && (highlight || _.contains(tags_array, 'notify_private')) ) { |
|
|
|
$rootScope.createHighlight(prefix, text, message, buffer, additionalContent); |
|
|
|
$rootScope.createHighlight(prefix, text, message, buffer, additionalContent); |
|
|
|