Fix is already defined errors
This commit is contained in:
parent
0912a2b55b
commit
c251c3b74c
3 changed files with 10 additions and 9 deletions
|
@ -122,10 +122,11 @@ var IrcUtils = {
|
||||||
|
|
||||||
// iterating nicks at the beginning?
|
// iterating nicks at the beginning?
|
||||||
var m = beforeCaret.match(new RegExp('^([a-zA-Z0-9_\\\\\\[\\]{}^`|-]+)' + suf + ' $'));
|
var m = beforeCaret.match(new RegExp('^([a-zA-Z0-9_\\\\\\[\\]{}^`|-]+)' + suf + ' $'));
|
||||||
|
var newNick = null;
|
||||||
if (m) {
|
if (m) {
|
||||||
if (doIterate) {
|
if (doIterate) {
|
||||||
// try iterating
|
// try iterating
|
||||||
var newNick = IrcUtils._nextNick(iterCandidate, m[1], searchNickList);
|
newNick = IrcUtils._nextNick(iterCandidate, m[1], searchNickList);
|
||||||
beforeCaret = newNick + suf + ' ';
|
beforeCaret = newNick + suf + ' ';
|
||||||
return {
|
return {
|
||||||
text: beforeCaret + afterCaret,
|
text: beforeCaret + afterCaret,
|
||||||
|
@ -143,7 +144,7 @@ var IrcUtils = {
|
||||||
m = beforeCaret.match(/^([a-zA-Z0-9_\\\[\]{}^`|-]+)$/);
|
m = beforeCaret.match(/^([a-zA-Z0-9_\\\[\]{}^`|-]+)$/);
|
||||||
if (m) {
|
if (m) {
|
||||||
// try completing
|
// try completing
|
||||||
var newNick = IrcUtils._completeSingleNick(m[1], searchNickList);
|
newNick = IrcUtils._completeSingleNick(m[1], searchNickList);
|
||||||
if (newNick === null) {
|
if (newNick === null) {
|
||||||
// no match
|
// no match
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -166,7 +167,7 @@ var IrcUtils = {
|
||||||
if (m) {
|
if (m) {
|
||||||
if (doIterate) {
|
if (doIterate) {
|
||||||
// try iterating
|
// try iterating
|
||||||
var newNick = IrcUtils._nextNick(iterCandidate, m[2], searchNickList);
|
newNick = IrcUtils._nextNick(iterCandidate, m[2], searchNickList);
|
||||||
beforeCaret = m[1] + newNick + ' ';
|
beforeCaret = m[1] + newNick + ' ';
|
||||||
return {
|
return {
|
||||||
text: beforeCaret + afterCaret,
|
text: beforeCaret + afterCaret,
|
||||||
|
@ -184,7 +185,7 @@ var IrcUtils = {
|
||||||
m = beforeCaret.match(/^(.* )([a-zA-Z0-9_\\\[\]{}^`|-]+)$/);
|
m = beforeCaret.match(/^(.* )([a-zA-Z0-9_\\\[\]{}^`|-]+)$/);
|
||||||
if (m) {
|
if (m) {
|
||||||
// try completing
|
// try completing
|
||||||
var newNick = IrcUtils._completeSingleNick(m[2], searchNickList);
|
newNick = IrcUtils._completeSingleNick(m[2], searchNickList);
|
||||||
if (newNick === null) {
|
if (newNick === null) {
|
||||||
// no match
|
// no match
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -63,7 +63,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
* Deletes a nick from nicklist
|
* Deletes a nick from nicklist
|
||||||
*/
|
*/
|
||||||
var delNick = function(group, nick) {
|
var delNick = function(group, nick) {
|
||||||
var group = nicklist[group];
|
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();
|
flatnicklist = getFlatNicklist();
|
||||||
/*
|
/*
|
||||||
|
@ -79,7 +79,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
* Updates a nick in nicklist
|
* Updates a nick in nicklist
|
||||||
*/
|
*/
|
||||||
var updateNick = function(group, nick) {
|
var updateNick = function(group, nick) {
|
||||||
var group = nicklist[group];
|
group = nicklist[group];
|
||||||
for(i in group.nicks) {
|
for(i in group.nicks) {
|
||||||
if(group.nicks[i].name == nick.name) {
|
if(group.nicks[i].name == nick.name) {
|
||||||
group.nicks[i] = nick;
|
group.nicks[i] = nick;
|
||||||
|
|
|
@ -60,13 +60,13 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) {
|
||||||
|
|
||||||
var nsfw = false;
|
var nsfw = false;
|
||||||
if (message.text.match(nsfwRegexp)) {
|
if (message.text.match(nsfwRegexp)) {
|
||||||
var nsfw = true;
|
nsfw = true;
|
||||||
visible = false;
|
visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pluginContent = plugins[i].contentForMessage(message.text);
|
var pluginContent = plugins[i].contentForMessage(message.text);
|
||||||
if (pluginContent) {
|
if (pluginContent) {
|
||||||
var pluginContent = {'visible': visible,
|
pluginContent = {'visible': visible,
|
||||||
'content': $sce.trustAsHtml(pluginContent),
|
'content': $sce.trustAsHtml(pluginContent),
|
||||||
'nsfw': nsfw,
|
'nsfw': nsfw,
|
||||||
'name': plugins[i].name };
|
'name': plugins[i].name };
|
||||||
|
@ -205,7 +205,7 @@ plugins.factory('userPlugins', function() {
|
||||||
var content = null;
|
var content = null;
|
||||||
|
|
||||||
if (url) {
|
if (url) {
|
||||||
var url = url[0]; /* Actually parse one url per message */
|
url = url[0]; /* Actually parse one url per message */
|
||||||
if (url.match(/png$|gif$|jpg$|jpeg$/)) {
|
if (url.match(/png$|gif$|jpg$|jpeg$/)) {
|
||||||
|
|
||||||
/* A fukung.net URL may end by an image extension but is not a direct link. */
|
/* A fukung.net URL may end by an image extension but is not a direct link. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue