[TORN] OC 2.0 Helper

Gives an overview of OC 2.0, showing members not in crimes, members in each crime, and if there are issues with any crimes. Visible when flying.

這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。

  • v5.2.0 2025-03-05

    Update 5.2.0

    • Added a button to toggle open/shut all crimes in that sub-section
    • Added an option to allow the timer to continue counting down after reaching 0. After reaching 0, the timer will turn
      red and start counting up. This can be used to see how long a crime has been waiting for a player to join, or to be
      executed. 
      • Enable this option in the settings page!
      • I have not had a chance to bugtest this as much as I'd like, so please let me know if it breaks!
    • Added the option to view the crime preparation status of each member in a crime. It is written as a percentage, in
      parenthesis after the member's name. 
      • Enable this option in the settings page.
    • Added indicators to crimes if members are either missing an item, or are below a user-set success chance. 
      • This success chance is set in the settings page.
      • By default, user success chances are yellow at 51% - 75%, and red for under 50%
      • Setting a minimum success chance will also force-color the members' success chance as red if they are under your
        set chance.
      • Set this the value to 0 to disable the success chance indicator
    • Changed the API test wording to better explain when the user does not have access to faction API
    • Removed the 'user inactive' icon (looks like a person) next to member names, as this was not very useful.
      • Instead, member names will turn red if they are inactive for longer than your set threshold (set in settings)
      • This will hopefully stop longer names from being misaligned in small screens. 
    • Members in federal will now correctly have their status shown as red. Additionally, fedded members' names will turn
      red and have a strikethrough in the member list.
    • Fixed a bug where changing the display window of the browser (resizing your browser window, or swapping from
      portrait to landscape mode) will cause all crimes to be shown. Resizing the window now maintains your previous view.
    • Fixed a bug where the buttons on the settings page are sometimes rendered too far to the right of the screen in
      certain viewport sizes.
    • Fixed a bug where some browsers display a big fat ugly square next to the crime slot number, instead of the
      beautiful triangles that I hoped people saw.
  • v5.1.1 2025-02-08

    Added a setting to remove the OC2.0 indicator to the sidebar

  • v5.1.0 2025-02-04

    Update v 5.1.0 

    Fixed a bug that counted recruits in the number of available members. A list of recruits (if you have any) now show up if you hover over the "x/y members available" text. 
    Changed the hover text for members not in crimes - now shows last OC joined and last activity in one single hover instead of in separate hovers.
    Improved the UX for screen readers (particularly for those that navigate using keyboard)
    Please reach out if anyone using a screen reader still has issues with using the script!

  • v5.0.2 2025-01-22

    Fixed placeholder text

  • v5.0.1 2025-01-22

    Fixed OC 2.0 table not showing in faction view while traveling

  • v5 2025-01-21

    For more info please see the forum post on torn.com https://www.torn.com/forums.php#/p=threads&f=67&t=16442996&b=0&a=0&start=20&to=25573933

    Added extra indicators in the member list (shoutout to Lewri [1762864] for helping with the logic behind this!)

    • Indicator for members that have been inactive for X amount of time
    • Indicator for members that have not participated in an OC for X amount of time
    • Indicator for members that have not participated in ANY recent OCs
    • Time since last OC should account for OCs that were stalled, by using the executed_at data from crimes where available

    Added the ability to sort members by time since last OC or time since last activity. Added a settings page where you can set your preferences for the above amount of time, as well as default sort

    • Settings page can be accessed by the dropdown menu OR a cog icon on the OC 2.0 overview section
    • The settings page may take a second or two to load. If you see the 404 page pop up please don't immediately panic! If the page doesn't load for over a minute, feel free to panic and post about how useless I am.

    Added the ability to add members to an ignore list so that they do not show up in the list of slacking members.

    • You will need to manually add and remove members from this list in the settings page.
    • Hitting 'reset to default' will remove all members in your ignore list.

    Changed the logic of the API key saving so that you can actually change your API key now. API key changing is also moved to the settings page

    • Added the ability to test an API key before saving it to make sure it works
    • Added the ability to delete the API key that was previously saved
    • The 'reset to default' button does NOT delete your saved API key. You must press the 'Delete API Key" button in the API Key section.

    TornPDA users: Since this userscript uses the API key given to TornPDA, you will be unable to modify or delete the saved API key from the settings screen. Please let me know if you have concerns about this!

    The OC 2.0 overview section now shows up even if the API key returns an error, and will tell you to set an API key (please note that it will still only show up at the factions#crimes page when in torn, and on the faction page when traveling.

    Slightly changed the sidebar OC 2.0 text - your position and success rate is now shown on mouseover (still unsure how to best deal with this)

    Fixed a tornPDA bug where the table is sometimes rendered multiple times. At least I hope I did... There is a known bug where swapping between tabs in the faction page too quickly may sometimes cause a duplicate of all crimes to appear. A refresh fixes it. Still trying to figure out how to stop it from happening.

    API v2 calls now use pass the API key in as an Authorization header instead of the query parameter. Auth headers don't seem to work for v1 calls so they are still passed in the old way.

  • v4 2025-01-13

    Added ability to sort OCs by level or time (click on the option to swap between ascending / descending sort)
    Made the member list more compact to save screen real estate

  • v3.3 2025-01-11

    Fixed the script not working in tampermonkey (sorry, I only tested this in violentmonkey)

  • v3.2.3 2025-01-10

    another fix for tornPDA spawning multiple tables

  • v3.2.2 2025-01-10

    fixed a logic error that prevented highlighting yourself if you are not in a crime

  • v3.2.1 2025-01-10

    fixed tornPDA arrows to be more visible

  • v3.2 2025-01-10

    reduced API calls - now does not bother making API calls if the sidebar isn't visible (mobile, tornPDA, or @media width<1000)

  • v3.1 2025-01-10

    Reduced API calls per run from 4 -> 2 on faction crime page, and from 2 -> 1 on other pages (for the sidebar)

  • v3 2025-01-10

    fixed a logic bug where pressing 'hide crimes' while one of the crimes is open results in incorrect styling
    removed excessive API calls for tornPDA because the sidebar isn't visible anyway

  • v2.51 2025-01-10

    fixed a typo of one symbol

  • v2.5 2025-01-10

    updated symbols to (hopefully) work with tornPDA

  • v2.4 2025-01-10

    More UI beautification
    Added a highlight of "you" so it's easy to tell which crime you are in at a glance

  • v2.3 2025-01-10

    - UI update for both small and large screens (including status color indications)
    - mouseover info for countdowns, status, crime items
    - Only a single API call for crime item mouseover names instead of crime item IDs

  • v2.2 2025-01-09

    Fixed travel view not loading (re-wrote logic and code for inserting the table)

  • v2.1 2025-01-08

    added status indicator for members in OC

  • v2.0 2025-01-08

    Change in how the list is shown, added crimes with visual indicators.

  • v1.5 2025-01-06
  • v1.5 2025-01-06

    Added $("span.hideInfoButton").off() before adding an .on("click") event in case the function is called multiple times.
    Removed a debug console.log()

  • v1.4 2025-01-06