Jump to content

[User Script] Compare Differences Between Inventory Snapshots and More


Julia

Recommended Posts

I'm having an issue where changing the dates after comparing two dates doesn't refresh the URL. This causes some problems suggesting with backpack histories.

That's intentional. The URL is always the time at which you're viewing and never the time you're comparing to. I've designed a separate menu for getting time links which is a little hard to find, but it's there. It's in the overview section of the guide: https://github.com/juliarose/backpack.tf-historical-comparison#overview

Link to comment
Share on other sites

Update 1.1.1

 

I've made some small changes relating to the recent update to backpack.tf. It broke switching times using the history graph, so I fixed it.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Julia help!  Some weird new backpack.tf update changed something and now the script is broken D:

I can't function more than a few hours without your script xD  I need to make more price suggestions: D:

I'm having the same problem as the people above me ^^

Link to comment
Share on other sites

Julia help!  Some weird new backpack.tf changed something and now the script is broken D:

I can't function more than a few hours without your script xD  I need to make more price suggestions: D:

I'm having the same problem as the people above me ^^

You could turn it off for now, that's what I did

 

e5ID5JI.png

Link to comment
Share on other sites

  • 3 weeks later...
  • Administrators

Hi, couple things: If you want to make your script more maintainable in case of changes in the future I would make a few adjustments to it.

 

Consolidate jQuery selector usage into variables at the start of the script. e.g. var $backpack = $('#backpack');. Remember that it is calling various functions whenever you use these selectors, so this way you can save a reusable reference to the DOM element, and as such improve the performance of your script by reducing the number of function invocations and make your code easier to maintain. As a general rule I like to use $ for names of variables that are holding a jQuery selector.

 

I will probably end up incorporating the functionality of this script into the main site at some point in the future as I do believe it's useful enough to become an official utility. It's probably the best thing to do because I looked at the userscript source and it looks like that you're needing to copy a lot of our own JS into it so functionality feels more native. It's a good script, that's for sure.

  • Like 3
Link to comment
Share on other sites

Hi, couple things: If you want to make your script more maintainable in case of changes in the future I would make a few adjustments to it.

Thanks for the feedback. I'm rather inconsistent with whether I assign a jQuery object to a variable or create multiple instances. I'm not sure of how greatly this affects performance, but I can see the latter being more efficient. It's something I'll research. :3

 

I've thought of how much more simple and efficient this would be if it were built-in to the main site. Especially if a separate page were made containing only the backpack data rather than a whole page when loading different times. There's a very good portion of the script that could be cut out if it were built into the main site, especially with the mess I've made to get the filters to always be placed consistently. The filters are being placed relative to other filters (the comparison field is always 3 slots before the historical view field), being re-arranged, and being removed and whatnot. A few of the functions are essentially the same as they're written in the backpack.tf source, but with a few very minor changes.

 

It's been a while since I've really looked at it, but I'll probably go back over it soon and see if I can improve on anything, maybe adding a few more notes as well.

Link to comment
Share on other sites

  • 1 month later...

Mine's is kind of broken:

The "New Items" display and "Removed Items" doesn't show.

Near ID's don't work.

Halp pls

 

hDZd71e.png

 

same problem here pls fix

 

also the search bar for the bp doesn't work, meaning I can't filter out items by name anymore

Link to comment
Share on other sites

Hai, so I fixed it. Proof:

 

JPX6NRH.png

 

Feel free to support/counter my suggestion!

 

You can download an update here: backpack.tf-historical-comparison.user.js

 

Changes include:

  • Updated to work with recent changes to backpack.tf.
  • Added settings in the "History Links" modal.
  • Added setting for altering the range used in the "Near ID" filter.
  • Added setting for automatically setting the comparison field on page load when a time parameter is present.
  • Changed appearance of shortcut link for adjusting the comparison time field.
  • Added an auto-updater (which hopefully works!).
Link to comment
Share on other sites

Wait.. where are the settings? >.> (Sorry if I'm being stupid). And also for some reason the new and removed items vary almost every time from the buyer's and to the sellers BP.

Link to comment
Share on other sites

  • Administrators

Probably because people don't only do one trade a day, so you're seeing multiple different trades in each before/after?

Link to comment
Share on other sites

Probably because people don't only do one trade a day, so you're seeing multiple different trades in each before/after?

Yeah... that's probably it ._. Also one more thing. Do you know where the settings are and why the near ID is derping out for me? Whenever I double click an item it only shows the unusual I double click. It doesn't show the recent trades that happened then. That's why I want to look at the settings because I am thinking I need to increase the Near ID range filter.

Link to comment
Share on other sites

  • Administrators

It's not meant to show recent trades, it's supposed to show items traded with that one based on IDs. It wouldn't be very helpful if it showed different recent trades all together?

 

If you do want to widen the range, you can do so here, but widening it isn't necessary unless there are a lot of items in the trade. If you widen it too much it will group items that were not included in the same trade, so most of the time it's better not to alter it.

 

9U1ulor.png

  • Like 2
Link to comment
Share on other sites

It's not meant to show recent trades, it's supposed to show items traded with that one based on IDs. It wouldn't be very helpful if it showed different recent trades all together?

Yes, I know that. It is supposed to show trades that occurred around the same time as the Near ID. Basically just ones with similar Near IDs correct? Sorry for being such a bother and asking so many questions >.> but all it does is show me the one unusual I double clicked. Not any other items. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...