Jump to content
Julia

[User Script] Compare Differences Between Inventory Snapshots and More

Recommended Posts

Julia

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

Share this post


Link to post
Share on other sites
Julia

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.

Share this post


Link to post
Share on other sites
Zapperzz

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 ^^

Share this post


Link to post
Share on other sites
Sakamoto

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

Share this post


Link to post
Share on other sites
fisk

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.

Share this post


Link to post
Share on other sites
Julia

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.

Share this post


Link to post
Share on other sites
SparkyYT

Mine's is kind of broken:

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

Near ID's don't work.

Halp pls

Share this post


Link to post
Share on other sites
Jazzy

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

Share this post


Link to post
Share on other sites
Julia

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!).

Share this post


Link to post
Share on other sites
DainbowRash

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.

Share this post


Link to post
Share on other sites
Teeny Tiny Cat

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

Share this post


Link to post
Share on other sites
DainbowRash

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.

Share this post


Link to post
Share on other sites
Teeny Tiny Cat

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

Share this post


Link to post
Share on other sites
DainbowRash

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. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...