Skip to content
TORNLIFE More

[Userscripts] tos

Started by tos [1976582] on in Tools & Userscripts.

90 replies · 5.52k views · thread synced · 4 days ago · View on torn.com
About this thread

Posts archived: 91 / 91 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
91
Discussion span
→
Authority score
60 / 100
Historical score
44 / 100
Story score
59 / 100
Engagement score
83 / 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.

Most-liked replies

Mentioned in this thread

Helcostr [1934501] ×2

tos [1976582]
API Quick Fill: https://greasyfork.org/en/scripts/25027-tornapi-quick-fill

^^^This one is great for ease of use at https://api.torn.com/


GENERAL


City Finds: https://greasyfork.org/en/scripts/372486-city-finds

Buy/Sell Swap: https://greasyfork.org/en/scripts/37079-buy-sell-swap

Company Helper: https://greasyfork.org/en/scripts/370250-company-helper

Bazaar Auto Price: https://greasyfork.org/en/scripts/371854-bazaar-auto-price

Big Al's Sell All: https://greasyfork.org/en/scripts/390598-big-al-sell-all

Special Gym Reqs: https://greasyfork.org/en/scripts/371872-special-gym-reqs

Laptop Full Screen: https://greasyfork.org/en/scripts/33959-torn-laptop-fullscreen

TC Inventory Abroad: https://greasyfork.org/en/scripts/377511-tc-inventory-abroad

Racing Upgrades Tooltip: https://greasyfork.org/en/scripts/28236-racing-upgrades
I don't personally use this one (made on request) and I think there are better ones out there by now.

FACTION


Faction Challenge Totals: https://greasyfork.org/en/scripts/37973-faction-challenge-totals

Chain Warn: https://greasyfork.org/en/scripts/370905-chain-warn

Faction Last Active: now maintained by Helcostr [1934501] post can be found here:
https://www.torn.com/forums.php#/forums.php?p=threads&f=67&t=16085532&b=0&a=0

Mentions: Helcostr [1934501] · [Userscripts] Helcostr

tos [1976582]

Two helpful templates for catching data loaded by the page:

// AJAX OBSERVER

$( document ).ajaxComplete((event, jqXHR, ajaxObj) => {
  if (jqXHR.responseText) console.log(jqXHR.responseText)
    console.log(ajaxObj)
})


// MUTATION OBSERVER 

const observer = new MutationObserver((mutations) => {
  for (const mutation of mutations) {
    for (const node of mutation.addedNodes) {
      console.log(node)
    }
  }
})

const wrapper = document.body//.querySelector('#mainContainer')
observer.observe(wrapper, { subtree: true, childList: true })
tos [1976582]

Haha, I was working on that with a couple extra features to it :p

Should be posted tonight (for me is more like early morning tomorrow torn time)
tos [1976582]

Added Company Helper
https://greasyfork.org/en/scripts/370250-company-helper

API key must be inserted into line 11 of code.

Adds highlights:
- employees - trains + rating >= max
- any employee eff
Adds toggles for last action in employee tab.
WARNING: These toggles cost one API call per employee, the call is fired only when the stats block changes from stats to last action. If the toggle-all in the title bar is used only those not already showing last action will result in api calls. Toggling these buttons too rapidly (particularly the toggle-all) could result in a soft API ban.

[image: i.imgur.com]
Zorgordian [2134053]

Hey TOS,

Regarding your "Last Active" Script, I've put my API key in but the toggle button doesnt show in the faction info page. Any idea why?
tos [1976582]

 Was having a problem with selectors on that one, I'll get with you and see if we can find out why.
tos [1976582]

I have it pointing at all pages so that it'll alert no matter where you are in torn, not just on faction page.  Mainly because with the updates to chaining most of target selection is no longer on the faction page.

Side note, it IS just observing the chain bar to alert so anywhere that there isn't one (say flying or in an attack) it won't alert.
tos [1976582]

Update chain warning script so that it won't go off all the time when hours show up (cooldown).

 

Also updated so that it'll fill the whole page but it's less than ideal.  Just a manual delay to check the height.

  Line 63: setTimeout(()=>{warn_overlay.style.height = $('body').height()+ 'px'}, 3000)  

If anyone has a better solution than that I'd love to know, bonus points for a purely css solution.
tos [1976582]

Thank you Mauk, knew there had to be an easy way I was missing.  Also updated again since it should probably turn off when chain hits zero...