From ba56f3bf6e4e75865cca4222d56a88026ff4f087 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Mon, 9 Jan 2017 08:29:18 +0200 Subject: [PATCH] Updated to comply with the new storage spec --- Plugins/emoteBlacklist.plugin.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Plugins/emoteBlacklist.plugin.js b/Plugins/emoteBlacklist.plugin.js index a695332..9dd5133 100644 --- a/Plugins/emoteBlacklist.plugin.js +++ b/Plugins/emoteBlacklist.plugin.js @@ -10,8 +10,9 @@ emoteBlacklist.prototype.start = function () { window.ebEnabled = true; var self = this; var em = bdPluginStorage.get("emoteBlacklist", "blacklist"); - if(em == undefined) return; - JSON.parse(em).forEach(function(emote) { + + if(em === null) return; + em.forEach(function(emote) { self.remove(emote); self.add(emote); }); @@ -36,8 +37,7 @@ emoteBlacklist.prototype.stop = function () { emoteBlacklist.prototype.clear = function() { var self = this; var em = bdPluginStorage.get("emoteBlacklist", "blacklist"); - if(em == undefined) return; - var em = JSON.parse(em); + if(em === null) return; em.forEach(function(emote) { self.remove(emote); }); @@ -48,8 +48,8 @@ emoteBlacklist.prototype.getSettingsPanel = function () { var html = ''; html += '

Emote Blacklist'; html += '