Remove global for variables

This commit is contained in:
David Cormier 2013-12-17 15:55:41 -05:00
parent c251c3b74c
commit 68f24554d1
3 changed files with 3 additions and 2 deletions

View file

@ -122,6 +122,7 @@ var IrcUtils = {
// iterating nicks at the beginning?
var m = beforeCaret.match(new RegExp('^([a-zA-Z0-9_\\\\\\[\\]{}^`|-]+)' + suf + ' $'));
var newNick = null;
if (m) {
if (doIterate) {

View file

@ -80,7 +80,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
*/
var updateNick = function(group, nick) {
group = nicklist[group];
for(i in group.nicks) {
for(var i in group.nicks) {
if(group.nicks[i].name == nick.name) {
group.nicks[i] = nick;
break;

View file

@ -123,7 +123,7 @@ plugins.factory('userPlugins', function() {
var spotifyPlugin = new Plugin(function(message) {
var addMatch = function(match) {
var ret = '';
for(i in match) {
for(var i in match) {
var id = match[i].substr(match[i].length-22, match[i].length);
ret += '<iframe src="//embed.spotify.com/?uri=spotify:track:'+id+'" width="300" height="80" frameborder="0" allowtransparency="true"></iframe>';
}