Delete trailing whitespaces

This commit is contained in:
David Cormier 2013-12-17 15:30:22 -05:00
parent cbf6bd9920
commit 6d5573a148
5 changed files with 40 additions and 41 deletions

View file

@ -1,6 +1,6 @@
var ls = angular.module('localStorage',[]);
ls.factory("$store",function($parse){
/**
* Global Vars
@ -110,4 +110,3 @@ ls.factory("$store",function($parse){
};
return publicMethods;
});

View file

@ -18,12 +18,12 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
var local_variables = message.local_vars;
var notify = 3 // Default 3 == message
var lines = []
var nicklist = {}
var nicklist = {}
var flatnicklist = []
var history = []
var historyPos = 0;
var active = false
var notification = 0
var notification = 0
var unread = 0
var lastSeen = -1
var serverSortKey = fullName.replace(/^irc.server.(\w+)/, "irc.$1");
@ -44,7 +44,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
/*
* Adds a line to this buffer
*
*
* @param line the BufferLine object
* @return undefined
*/
@ -91,7 +91,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
/*
* Maintain a cached version of a flat sorted nicklist
*
*
*/
var getFlatNicklist = function() {
var newlist = [];
@ -99,7 +99,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
_.each(nickGroup.nicks, function(nickObj) {
newlist.push(nickObj.name);
});
});
});
newlist.sort(function(a, b) {
return a.toLowerCase() < b.toLowerCase() ? -1 : 1;
});
@ -181,7 +181,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
}
}
/*
* BufferLine class
*/
@ -331,13 +331,13 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
nicks: nicks
}
}
var BufferList = []
activeBuffer = null;
unreads = 0;
notifications = 0;
this.model = { 'buffers': {} }
/*
@ -387,7 +387,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
}
var previousBuffer = this.getActiveBuffer();
activeBuffer = _.find(this.model.buffers, function(buffer) {
if (buffer[key] == bufferId) {
return buffer;

View file

@ -11,7 +11,7 @@ plugins = angular.module('plugins', []);
* that parses a string and return any additional content.
*/
var Plugin = function(contentForMessage) {
return {
contentForMessage: contentForMessage,
exclusive: false,
@ -35,7 +35,7 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) {
* Defines the plugin manager object
*/
var PluginManagerObject = function() {
var plugins = [];
/*

View file

@ -205,7 +205,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
* Returns the current callback id
*/
var getCurrentCallBackId = function() {
currentCallBackId += 1;
if (currentCallBackId > 1000) {
@ -439,22 +439,22 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
}
$rootScope.countWatchers = function () {
$rootScope.countWatchers = function () {
var root = $(document.getElementsByTagName('body'));
var watchers = [];
var f = function (element) {
if (element.data().hasOwnProperty('$scope')) {
angular.forEach(element.data().$scope.$$watchers, function (watcher) {
watchers.push(watcher);
});
}
angular.forEach(element.children(), function (childElement) {
f($(childElement));
});
};
f(root);
console.log(watchers.length);
};
@ -489,13 +489,13 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// we will send a /buffer bufferName command every time
// the user switches a buffer. This will ensure that notifications
// are cleared in the buffer the user switches to
if($scope.hotlistsync && ab.fullName) {
if($scope.hotlistsync && ab.fullName) {
connection.sendCoreCommand('/buffer ' + ab.fullName);
}
// Clear search term on buffer change
$scope.search = '';
// Check if we should show nicklist or not
$scope.showNicklist = $scope.updateShowNicklist();
});
@ -545,9 +545,9 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Save setting for syncing hotlist
$store.bind($scope, "hotlistsync", true);
// Save setting for displaying nicklist
$store.bind($scope, "nonicklist", false);
$store.bind($scope, "nonicklist", false);
// Save setting for displaying embeds
$store.bind($scope, "noembed", false);
$store.bind($scope, "noembed", false);
// Save setting for channel ordering
$store.bind($scope, "orderbyserver", false);
// Save setting for displaying embeds in rootscope so it can be used from service
@ -642,14 +642,14 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
var notification = new Notification(title, {body:content, icon:'img/favicon.png'});
// Cancel notification automatically
notification.onshow = function() {
setTimeout(function() {
setTimeout(function() {
notification.close();
}, timeout);
};
};
$scope.hasUnread = function(buffer) {
// if search is set, return every buffer
// if search is set, return every buffer
if($scope.search && $scope.search !== "") {
return true;
}
@ -668,7 +668,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$scope.showNicklist = $scope.updateShowNicklist();
});
$scope.showNicklist = false;
// Utility function that template can use to check if nicklist should
// Utility function that template can use to check if nicklist should
// be displayed for current buffer or not
// is called on buffer switch
$scope.updateShowNicklist = function() {
@ -681,7 +681,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
return false;
}
// Use flat nicklist to check if empty
if(ab.flatNicklist().length === 0) {
if(ab.flatNicklist().length === 0) {
return false;
}
return true;
@ -725,7 +725,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
}]
);
weechat.config(['$routeProvider',
weechat.config(['$routeProvider',
function($routeProvider) {
$routeProvider.when('/', {
@ -791,7 +791,7 @@ weechat.directive('inputBar', function() {
if (!$rootScope.connected) {
return true;
}
// Support different browser quirks
var code = $event.keyCode ? $event.keyCode : $event.charCode;

View file

@ -138,7 +138,7 @@
}
};
};
/**
* Gets the default style (default colors and attributes).
*
@ -290,7 +290,7 @@
fn: function(m) {
var ret = {};
var optionCode = parseInt(m[1]);
if (optionCode > 43) {
// should never happen
return {
@ -309,7 +309,7 @@
name: optionName,
override: {}
};
return ret;
}
},
@ -335,7 +335,7 @@
var ret = {
bgColor: null
};
if (m[2]) {
ret.attrs = WeeChatProtocol._attrsFromStr(m[1]);
ret.fgColor = WeeChatProtocol._getColorObj(m[2]);
@ -343,7 +343,7 @@
ret.attrs = WeeChatProtocol._attrsFromStr(m[3]);
ret.fgColor = WeeChatProtocol._getColorObj(m[4]);
}
return ret;
}
},
@ -369,7 +369,7 @@
regex: /^\*(?:([\x01\x02\x03\x04*!\/_|]*)(\d{2})|@([\x01\x02\x03\x04*!\/_|]*)(\d{5})),(\d{2}|@\d{5})/,
fn: function(m) {
var ret = {};
if (m[2]) {
ret.attrs = WeeChatProtocol._attrsFromStr(m[1]);
ret.fgColor = WeeChatProtocol._getColorObj(m[2]);
@ -378,7 +378,7 @@
ret.fgColor = WeeChatProtocol._getColorObj(m[4]);
}
ret.bgColor = WeeChatProtocol._getColorObj(m[5]);
return ret;
}
},
@ -401,7 +401,7 @@
regex: /^E/,
fn: function(m) {
var ret = {};
ret.fgColor = {
type: 'option',
name: 'emphasis'
@ -411,12 +411,12 @@
name: 'emphasis',
override: {}
};
return ret;
}
}
];
// parse
var ret = {
fgColor: null,
@ -431,10 +431,10 @@
ret.text = txt.substring(m[0].length);
return true;
}
return false;
});
return ret;
};
@ -469,7 +469,7 @@
var curAttrs = WeeChatProtocol._getDefaultAttributes();
var curSpecialToken = null;
var curAttrsOnlyFalseOverrides = true;
return parts.map(function(p) {
if (p.length === 0) {
return null;