Skip to content
TORNLIFE More

[userscript] Torn Race Stats

Started by PsycWard [1579270] on in Tools & Userscripts.

35 replies · 2.56k views · thread synced · 6 days ago · View on torn.com
About this thread

Posts archived: 36 / 36 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
36
Discussion span
→
Authority score
53 / 100
Historical score
41 / 100
Story score
53 / 100
Engagement score
74 / 100

People posting, likes and official posts are not counted for this thread yet: on threads longer than one page they come from a periodic pass over the archive, which has not covered it.

PsycWard [1579270]

This script looks at the width attribute of each bar and displays it numerically for easy reading.
The parts page does not update when you install a new upgrade so the numbers do not update either unless you refresh and go back in. The numbers when looking at parts do not necessarily show you the end result because the bars on torn are not set up that way, they are mainly to compare interchangeable parts.

[image: i.imgur.com]

[image: i.imgur.com]

[image: i.imgur.com]



Words were being automatically removed from the script when posted directly. Please use this link Torn Race Stats 0.1 if you want to try it out.
PsycWard [1579270]

Sorry this happened to me before when I posted through message but I didn't know it happened in the forums too, words are being removed. I'll upload it and link it.
kin0 [1858750]

I can't get this to work, I think it's something with the include line being for racing.php yet the "parts" section adds &add=parts.php
PsycWard [1579270]

On my browser the url never changes when I click around in the racing area so I kept to one location for the includes.

If your url changes in your browser when you click Parts or you like to type in the url to get directly to parts (http://www.torn.com/loader.php?sid=racing&tab=parts) you could change includes to "*torn.com/loader.php?sid=racing*" and that may fix your problem. The only problem with directly linking would be that some portions of the script are triggered by clicks. So even after entering a url to parts for example you may still have to click the parts icon activate the script. In short if you are directly linking it would probably be much easier to stop and just use http://www.torn.com/loader.php?sid=racing if you want the script to function properly.

If the url doesn't change when you click Part and you are not typing in http://www.torn.com/loader.php?sid=racing&tab=parts to get to parts directly I'm not sure why you would have a problem. I only use Chrome on Linux so other browsers/OS's may have issues I'm unaware of. I no longer try to test my scripts on multiple browsers.
Hexellate [1935916]

Just a quick idea I had, it might be worth checking if the bar is red or green, because one of my cars is showing the length of the red bar which is incorrect. Anyway, great script. R+
PsycWard [1579270]

When I originally wrote the script I did have an extra step that checked the color of the bar but from the testing I did the numbers still decreased while displaying the red bar numbers.
I'll look into it again as it has been some time since I wrote it but it is only meant to be a comparison tool; this car vs that car or this part vs that part. So as long as the numbers increase and decrease at a set rate giving comparable data I'm pretty happy with it.
Tempest [1867527] Wiki Contributor

I tried it a few days ago and it was displaying white screen when I tried to navigate to Racing Page.(Chrome, Tampermonkey)

I fixed it by changing jquery link in the script.





PsycWard [1579270]

Thanks, it's still working for me. Could you post the jquery source you're using just incase someone else has the same problem.

I know that I was lazy and I never updated the description but firefox users need to remove the jquery line because there is a known issue with ff and jquery libraries.
// @require http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js