From 97a482854b59128dbb5d4879daff0835d5928e02 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 5 Mar 2014 23:37:38 +0100 Subject: [PATCH] fixed delete item link --- chat_filter.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chat_filter.user.js b/chat_filter.user.js index 36eb3cc..d64f752 100644 --- a/chat_filter.user.js +++ b/chat_filter.user.js @@ -547,8 +547,8 @@ function initialize_ui(){ function add_item_to_ui(new_word){ $('#list-' + option.name + ' .list-inner') - .append('' + new_word + ' [X]
'); - $("#list-" + option.name + "-" + new_word).click(function(e){ + .append('' + new_word + ' [X]
'); + $("#list-" + option.name + "-" + option.element.indexOf(new_word)).click(function(e){ e.preventDefault(); option.element.splice(option.element.indexOf(new_word), 1); localStorage.setItem("tpp-custom-filter-" + option.name, JSON.stringify(option.element));