Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

24k Star Award Helper

I wrote a basic script so that you can get an estimate of how many posts are needed to get the award, and how many you would need to post each day to get the award in one year. It's a little rough as it works off of the percentage amount and not the exact number of posts one has submitted, but I will try to improve it over time. I'm using it in TamperMonkey, but whatever you like to use should be fine.

[Image: XCZJQWa.png]


Code
// ==UserScript==
// @name        HF 24k Star Estimate
// @author      TheCuriousCoyote
// @namespace   https://github.com/TheCuriousCoyote
// @version     1.0.0
// @description Calculates estimated posts and average daily posts needed to obtain the 24k Star Award in one year.
// @match       ://hackforums.net/awardgoals.php
// @copyright   2023+
// ==/UserScript==

// ------------------------------ SETTINGS ------------------------------
const awardThreshold = 24000;
// ------------------------------ SCRIPT ------------------------------

// Get 24k Star awardgoal card, then progress
const twentyfourkstarparentElement = $("i[title='24k Star']").parent().parent();
const twentyfourkstarElement = twentyfourkstarparentElement.length > 0 ? twentyfourkstarparentElement[0] : null;
const progress = twentyfourkstarElement ? $(twentyfourkstarElement).find(".percentage").text().replace('%', '') : 0;

// Calculate posts and differences
const estimatedPosts = Math.floor(awardThreshold * (progress / 100));
const remainingPosts = awardThreshold - estimatedPosts;

// Append results to card
$(twentyfourkstarparentElement).append($("<div>").text(`Posts Remaining: ~${remainingPosts}`));
$(twentyfourkstarparentElement).append($("<div>").text(`Avg Posts/Day: ${(remainingPosts / 365).toFixed(2)}`));
New experiences loading...
love the idea! would be nice if that could be implemented onsite.
maybe for loungehead too, so ppl know how much time they have left, etc.
just because i'm a jewish black trans midget with bbc :(
This could actually be a good addition to the awards section, in my opinion it would push to get more competition and dedication in getting these awards, after all they are simple mathematical calculations that everyone can do to their own interests. Nice idea in any case.
(Apr 23, 2023 09:41 AM)flyingduck Wrote:  love the idea! would be nice if that could be implemented onsite.
maybe for loungehead too, so ppl know how much time they have left, etc.

Thanks, glad you like it! I thought it might be a useful thing for people, and I may write a Lounge Head tracker next, nice idea. Hadn't thought of it as I've got the award, so I appreciate the feedback there.

(Apr 23, 2023 10:35 AM)ALEDIO Wrote:  This could actually be a good addition to the awards section, in my opinion it would push to get more competition and dedication in getting these awards, after all they are simple mathematical calculations that everyone can do to their own interests. Nice idea in any case.

I've always thought so, but then I think things like this can encourage members to explore their coding ability to make it happen, and in my case it definitely did that lol. Thank you for the feedback!
New experiences loading...
its nice to see that you make this useful script. i appreciate it
aha nice.

Could you go the extra mile and make this a greasemonkey script for us ? 👀 I challenge you 🖤
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█
██ 📿 🔮 🫀 ⚡️ 🥣 ██
█▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄█