Skip to content
TORNLIFE More

[Userscript] Easter Egg Hunt

Started by Heasleys4hemp [1468764] Committee on in Tools & Userscripts.

116 replies · 7.16k views · thread synced · 6 days ago · View on torn.com

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

Untouchable [1360035] Committee Committee
If the flashing is annoying you like it did me, remove 'animateElementJS(randomLink);' :D

Other than this, it's great! Thank you.
xedx [2100735]
I made a small change so that it would display *above* the 'Areas' portion of the sidebar, which also makes it appear above DocTorN Quick Links, so I don't have to scroll:

let sidebar = document.getElementsByClassName('sidebar-block___1Cqc2' /*'svelte-1qxe1i9'*/)[0];
if (sidebar != 'undefined' && sidebar != null) {
sidebar.appendChild(randomLink);
} else {
homenav.parentNode.insertBefore(randomLink, homenav);
}

I normally have a much more robust check for invalid pointers, this was a quick hack :-) the 'svelte-nnn' class name is the DocTorn Quick Links class, but it isn't loaded when the script runs, hence why it is commented out.

Interesting script and nifty idea for lazy people (like me). Lest people complain, you CAN find eggs on 'Invalid Pages' - such as the museum, which I don't have access to yet. Or the travel page, if I'm in a race.
xedx [2100735]
P.S. - maybe next I'll try a) filtering out the logout link and b) randomly traverse the forums, for interesting reading if nothing else.
Heasleys4hemp [1468764] Committee Committee
I didn't think I set one of the links to logout o.o I can double check that. I'll be removing pc.php as well, because it doesn't have a sidebar

I think I'll remove the blinking as well, and random forums would be neat :)
xedx [2100735]
See my post, above. It's apparently Torn as others in my fac, not using this script, have been having same issue.
xedx [2100735]
Heasleys4hemp - see your messages, added individual forum threads, but not sub-threads yet. You may want to add @updateURL also, to the header. I use GitHub, not sure what update URL GreasyFork provides. Main general forum threads are hard-coded URL's, sub-threads I think I'd do like profile ID's, sort of - but take a random <li> out of # of <lis>'s in the <ul>. Can't be hard-coded.

Oh, I commented out the main forums.php, don't have to. Probably shouldn't....
Smokey123 [248901] Helper
Thank you xedx, Just added that bit of code (i got the placement wrong at first) but sorted now.

I am also going to remove the pc.php bit as that opens the screen up in laptop mode and means i have to actually move my mouse around.

I am also going to add all the sub links to every education and some other places that you missed from the list.

Also noticed that some of the player ID's it selects (infact ALL of the ones it has already selected) are FEDDED PLAYERS or NO LONGER AVAILABLE (page doesnt show they are a player).
xedx [2100735]
Fedded player's page will still spawn eggs. Any Torn page will, for that matter, even error pages (as long as there is the Torn logo on it).

Here's the list of general forums, in the array, that you can add. I didn't add the sub-threads yet, that I'll code in as mentioned above, it's not hard, I just haven't gotten around to it yet:

const linksarray = ["index.php","item.php","city.php","jobs.php","gym.php","properties.php","education.php","crimes.php",
"loader.php?sid=missions","newspaper.php","jailview.php","hospitalview.php","casino.php", /*"forums.php",*/
"halloffame.php","factions.php","bringafriend.php","competition.php","friendlist.php","blacklist.php",
"messages.php","events.php","awards.php","points.php","rules.php","staff.php","credits.php","citystats.php",
"committee.php","bank.php","donator.php","stockexchange.php","fans.php","museum.php","loader.php?sid=racing",
"church.php","dump.php","loan.php","travelagency.php","amarket.php","bigalgunshop.php","shops.php?step=bitsnbobs",
"shops.php?step=cyberforce","shops.php?step=docks","shops.php?step=jewelry","shops.php?step=nikeh",
"shops.php?step=pawnshop","shops.php?step=pharmacy","pmarket.php","shops.php?step=postoffice","shops.php?step=super",
"shops.php?step=candy","shops.php?step=clothes","imarket.php","estateagents.php","bazaar.php","calendar.php",
"token_shop.php","freebies.php","comics.php","joblist.php","newspaper_class.php","personals.php","chronicles.php",
/*"pc.php",*/ "bounties.php","trade.php","sendcash.php","usersonline.php","profiles.php?XID=",

<== Add from here down ==>

"forums.php#/p=forums&f=2","forums.php#/p=forums&f=3","forums.php#/p=forums&f=63","forums.php#/p=forums&f=16",
"forums.php#/p=forums&f=9","forums.php#/p=forums&f=24","forums.php#/p=forums&f=20","forums.php#/p=forums&f=46",
"forums.php#/p=forums&f=59","forums.php#/p=forums&f=11","forums.php#/p=forums&f=22","forums.php#/p=forums&f=15",
"forums.php#/p=forums&f=21","forums.php#/p=forums&f=47","forums.php#/p=forums&f=23","forums.php#/p=forums&f=67",
"forums.php#/p=forums&f=14","forums.php#/p=forums&f=63","forums.php#/p=forums&f=19","forums.php#/p=forums&f=4",
"forums.php#/p=forums&f=17","forums.php#/p=forums&f=69","forums.php#/p=forums&f=68"
];

Just add the forum links at the bottom, you can see I commented out pc.php and forums.php, don't bother commenting forums.php out. I don't really mind having pc.php, either, I just click each link in there and then close it.

I've left it to heasleys4hemp to update his original, and put on his GreasyFork page, with an update URL....
xedx [2100735]
I'm leaving that to the original author (as it's his script - he wrote it :-)), I sent him a message but not sure if he's online ATM. My snippets were so anyone so inclined could self-modify if they are used to doing that.
Mathuaerknedam [2461123]
Thanks to everyone who's posted tweaks.

Anyone know how to:
1. make this accessible while flying
2. while flying, make it load only (or mostly) forum threads and user profiles.