From 71ceaeb5b8347a2430694436ccf446af982ca841 Mon Sep 17 00:00:00 2001 From: Abhorrent_Anger Date: Thu, 21 Mar 2024 15:13:44 +0200 Subject: [PATCH] JS fixes --- script.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 24a87a8..c9b75d8 100644 --- a/script.js +++ b/script.js @@ -109,7 +109,7 @@ function handleHTML(steam_id, steam_name, html_string) { inventory.append('

' + steam_name + '

'); decaled_items.each(function () { var parent = $(this).parent(); - if (parent.hasClass('q-440-11') || parent.hasClass('nocraft') || parent.attr('data-listing_price').indexOf('keys') >= 0) { + if (parent.hasClass('q-440-11') || parent.hasClass('nocraft') || parent.attr('data-listing_price').includes('keys')) { filtered_item_count++; return; } @@ -119,8 +119,7 @@ function handleHTML(steam_id, steam_name, html_string) { inventory.append(a); }); if (filtered_item_count) { - var link = getHiddenAccountLink(steam_id, steam_name); - link.prepend('(' + filtered_item_count + ') ') + var link = getHiddenAccountLink(steam_id, steam_name + ' (' + filtered_item_count + ')'); $('#filtered-accounts').append(link); $('#filtered-accounts').fadeIn(); }