From e2a84470ced04ca0d06aa60f451014da6c4b6099 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Tue, 17 Dec 2013 15:35:36 -0500 Subject: [PATCH] Add missing semicolons --- js/models.js | 84 +++++++++++++++++++++++++-------------------------- js/plugins.js | 20 ++++++------ 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/js/models.js b/js/models.js index 729adc6..3f922ca 100644 --- a/js/models.js +++ b/js/models.js @@ -10,22 +10,22 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) */ this.Buffer = function(message) { // weechat properties - var fullName = message.full_name - var shortName = message.short_name - var title = message.title - var number = message.number - var pointer = message.pointers[0] + var fullName = message.full_name; + var shortName = message.short_name; + var title = message.title; + var number = message.number; + var pointer = message.pointers[0]; var local_variables = message.local_vars; - var notify = 3 // Default 3 == message - var lines = [] - var nicklist = {} - var flatnicklist = [] - var history = [] + var notify = 3; // Default 3 == message + var lines = []; + var nicklist = {}; + var flatnicklist = []; + var history = []; var historyPos = 0; - var active = false - var notification = 0 - var unread = 0 - var lastSeen = -1 + var active = false; + var notification = 0; + var unread = 0; + var lastSeen = -1; var serverSortKey = fullName.replace(/^irc.server.(\w+)/, "irc.$1"); var indent = function(predicate) { @@ -35,7 +35,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) } else { return ""; } - } + }; // Buffer opened message does not include notify level if( message.notify != undefined ) { @@ -50,7 +50,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) */ var addLine = function(line) { lines.push(line); - } + }; /* * Adds a nick to nicklist @@ -58,13 +58,13 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) var addNick = function(group, nick) { nicklist[group].nicks.push(nick); flatnicklist = getFlatNicklist(); - } + }; /* * Deletes a nick from nicklist */ var delNick = function(group, nick) { var group = nicklist[group]; - group.nicks = _.filter(group.nicks, function(n) { return n.name != nick.name}); + group.nicks = _.filter(group.nicks, function(n) { return n.name != nick.name;}); flatnicklist = getFlatNicklist(); /* for(i in group.nicks) { @@ -74,7 +74,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) } } */ - } + }; /* * Updates a nick in nicklist */ @@ -87,7 +87,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) } } flatnicklist = getFlatNicklist(); - } + }; /* * Maintain a cached version of a flat sorted nicklist @@ -104,11 +104,11 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) return a.toLowerCase() < b.toLowerCase() ? -1 : 1; }); return newlist; - } + }; var flatNicklist = function() { return flatnicklist; - } + }; var addToHistory = function(line) { var result = ""; @@ -119,7 +119,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) history.push(line); historyPos = history.length; // Go to end of history return result; - } + }; var getHistoryUp = function(currentLine) { if (historyPos >= history.length) { @@ -135,7 +135,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) var line = history[historyPos]; return line; } - } + }; var getHistoryDown = function(currentLine) { if (historyPos < 0 || historyPos >= history.length) { @@ -152,7 +152,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) return history[historyPos]; } } - } + }; return { id: pointer, @@ -178,9 +178,9 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) addToHistory: addToHistory, getHistoryUp: getHistoryUp, getHistoryDown: getHistoryDown - } + }; - } + }; /* * BufferLine class @@ -259,9 +259,9 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) displayed: displayed, text: rtext, - } + }; - } + }; function nickGetColorClasses(nickMsg, propName) { if (propName in nickMsg && nickMsg[propName] && nickMsg[propName].length > 0) { @@ -315,8 +315,8 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) name: name, prefixClasses: colorClasses.prefix, nameClasses: colorClasses.name - } - } + }; + }; /* * Nicklist Group class */ @@ -329,16 +329,16 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) name: name, visible: visible, nicks: nicks - } - } + }; + }; - var BufferList = [] + var BufferList = []; activeBuffer = null; unreads = 0; notifications = 0; - this.model = { 'buffers': {} } + this.model = { 'buffers': {} }; /* * Adds a buffer to the list @@ -352,7 +352,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) activeBuffer = buffer.id; } this.model.buffers[buffer.id] = buffer; - } + }; this.getBufferByIndex = function(index) { var i = 0; @@ -363,7 +363,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) } } - } + }; /* * Returns the current active buffer @@ -372,7 +372,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) */ this.getActiveBuffer = function() { return activeBuffer; - } + }; /* * Sets the buffer specifiee by bufferId as active. @@ -414,14 +414,14 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) $rootScope.$emit('activeBufferChanged'); $rootScope.$emit('notificationChanged'); return true; - } + }; /* * Returns the buffer list */ this.getBuffers = function() { return BufferList; - } + }; /* * Returns a specific buffer object @@ -435,7 +435,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) return buffer; } }); - } + }; /* * Closes a weechat buffer. Sets the first buffer @@ -451,5 +451,5 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) this.setActiveBuffer(firstBuffer); } delete(this.model.buffers[bufferId.id]); - } + }; }]); diff --git a/js/plugins.js b/js/plugins.js index 71ff695..1ba5719 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -16,8 +16,8 @@ var Plugin = function(contentForMessage) { contentForMessage: contentForMessage, exclusive: false, name: "additional content" - } -} + }; +}; /* * This service provides access to the plugin manager @@ -47,7 +47,7 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) { for (var i = 0; i < userPlugins.length; i++) { plugins.push(userPlugins[i]); }; - } + }; /* * Iterates through all the registered plugins @@ -69,7 +69,7 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) { var pluginContent = {'visible': visible, 'content': $sce.trustAsHtml(pluginContent), 'nsfw': nsfw, - 'name': plugins[i].name } + 'name': plugins[i].name }; message.metadata.push(pluginContent); @@ -81,13 +81,13 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) { } return message; - } + }; return { registerPlugins: registerPlugins, contentForMessage: contentForMessage - } - } + }; + }; // Instanciates and registers the plugin manager. this.PluginManager = new PluginManagerObject(); @@ -134,7 +134,7 @@ plugins.factory('userPlugins', function() { ret += addMatch(message.match(/open.spotify.com\/track\/([a-zA-Z-0-9]{22})/g)); return ret; }); - spotifyPlugin.name = 'Spotify track' + spotifyPlugin.name = 'Spotify track'; /* * YouTube Embedded Player @@ -210,7 +210,7 @@ plugins.factory('userPlugins', function() { /* A fukung.net URL may end by an image extension but is not a direct link. */ if (url.indexOf("fukung.net/v/") != -1) { - url = url.replace(/.*\//, "http://media.fukung.net/imgs/") + url = url.replace(/.*\//, "http://media.fukung.net/imgs/"); } content = ''; @@ -268,5 +268,5 @@ plugins.factory('userPlugins', function() { return { plugins: [youtubePlugin, dailymotionPlugin, allocinePlugin, imagePlugin, spotifyPlugin, cloudmusicPlugin, googlemapPlugin] - } + }; });