Fix filters.js indentation

This commit is contained in:
Oliver Hamlet
2016-03-19 15:06:47 +00:00
parent 40c0f8a232
commit 31991899c9
+50 -50
View File
@@ -10,62 +10,62 @@
}
}(this, () => {
return class Filters {
constructor(l10n) {
/* Plugin filters */
this.hideMessagelessPlugins = false;
this.hideInactivePlugins = false;
this.conflictingPluginNames = [];
this.contentSearchString = '';
constructor(l10n) {
/* Plugin filters */
this.hideMessagelessPlugins = false;
this.hideInactivePlugins = false;
this.conflictingPluginNames = [];
this.contentSearchString = '';
/* Plugin content filters */
this.hideVersionNumbers = false;
this.hideCRCs = false;
this.hideBashTags = false;
this.hideAllPluginMessages = false;
this.hideNotes = false;
this.hideDoNotCleanMessages = false;
/* Plugin content filters */
this.hideVersionNumbers = false;
this.hideCRCs = false;
this.hideBashTags = false;
this.hideAllPluginMessages = false;
this.hideNotes = false;
this.hideDoNotCleanMessages = false;
this._doNotCleanString = l10n.translate('Do not clean').toLowerCase();
this._doNotCleanString = l10n.translate('Do not clean').toLowerCase();
}
pluginFilter(plugin) {
if (this.hideInactivePlugins && !plugin.isActive) {
return false;
}
pluginFilter(plugin) {
if (this.hideInactivePlugins && !plugin.isActive) {
return false;
}
if (this.conflictingPluginNames.length !== 0
&& this.conflictingPluginNames.indexOf(plugin.name) === -1) {
return false;
}
if (this.hideMessagelessPlugins
&& plugin.getCardContent(this).messages.length === 0) {
return false;
}
if (this.contentSearchString.length !== 0
&& !plugin.getCardContent(this).containsText(this.contentSearchString)) {
return false;
}
return true;
if (this.conflictingPluginNames.length !== 0
&& this.conflictingPluginNames.indexOf(plugin.name) === -1) {
return false;
}
messageFilter(message) {
if (this.hideAllPluginMessages) {
return false;
}
if (this.hideNotes && message.type === 'say') {
return false;
}
if (this.hideDoNotCleanMessages
&& message.content.toLowerCase().indexOf(this._doNotCleanString) !== -1) {
return false;
}
return true;
if (this.hideMessagelessPlugins
&& plugin.getCardContent(this).messages.length === 0) {
return false;
}
if (this.contentSearchString.length !== 0
&& !plugin.getCardContent(this).containsText(this.contentSearchString)) {
return false;
}
return true;
}
messageFilter(message) {
if (this.hideAllPluginMessages) {
return false;
}
if (this.hideNotes && message.type === 'say') {
return false;
}
if (this.hideDoNotCleanMessages
&& message.content.toLowerCase().indexOf(this._doNotCleanString) !== -1) {
return false;
}
return true;
}
};
}));