From d01d69b9e72360b0b19c2618b3c3504704ea83da Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 30 Nov 2019 23:16:34 -0500 Subject: [PATCH] Update doignore() in main.js to match new Item\Ignore return type - Remove superfluous jQuery selectors --- view/js/main.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/view/js/main.js b/view/js/main.js index e15ee77e19..37975dd338 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -649,14 +649,16 @@ function doignore(ident) { ident = ident.toString(); $('#like-rotator-' + ident).show(); $.get('item/ignore/' + ident, function(data) { - if (data.match(/1/)) { - $('#ignored-' + ident).addClass('ignored'); - $('#ignored-' + ident).removeClass('unignored'); + if (data === 1) { + $('#ignored-' + ident) + .addClass('ignored') + .removeClass('unignored'); $('#ignore-' + ident).addClass('hidden'); $('#unignore-' + ident).removeClass('hidden'); } else { - $('#ignored-' + ident).addClass('unignored'); - $('#ignored-' + ident).removeClass('ignored'); + $('#ignored-' + ident) + .addClass('unignored') + .removeClass('ignored'); $('#ignore-' + ident).removeClass('hidden'); $('#unignore-' + ident).addClass('hidden'); } -- 2.39.5