diff --git a/code.user.js b/code.user.js index 5530d17..1b46977 100644 --- a/code.user.js +++ b/code.user.js @@ -3101,14 +3101,12 @@ sortFunction: function(a, b) { var listingPriceA = $(a.values().market_listing_price).text(); listingPriceA = listingPriceA.substr(0, listingPriceA.indexOf('(')); - listingPriceA = listingPriceA.replace('--', '00'); var listingPriceB = $(b.values().market_listing_price).text(); listingPriceB = listingPriceB.substr(0, listingPriceB.indexOf('(')); - listingPriceB = listingPriceB.replace('--', '00'); - var firstPrice = parseInt(replaceNonNumbers(listingPriceA)); - var secondPrice = parseInt(replaceNonNumbers(listingPriceB)); + var firstPrice = unsafeWindow.GetPriceValueAsInt(listingPriceA); + var secondPrice = unsafeWindow.GetPriceValueAsInt(listingPriceB); return firstPrice - secondPrice; }