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

Mathuaerknedam [2461123]
If you just want it in the corner, but don't care if it's pretty (easier)

Look for the function "insertTravel" and find

travelrandomLink.setAttribute('class', 't-clear h c-pointer m-icon line-h24 right last');

Place this below it:

travelrandomLink.setAttribute('style', 'position:fixed; left:0; top:0;');

That should work, but won't be pretty.


If you want it in the corner and want it to be pretty

Look for the function "insertTravel" and find

<span> Easter Egg Hunt </span>


Delete it.

Then find

travelrandomLink.setAttribute('class', 't-clear h c-pointer m-icon line-h24 right last');


Place this below it:

travelrandomLink.setAttribute('style', 'position:fixed; left:1px; top:1px; fill: rgb(138, 165, 67); z-index:99999; border-radius: 4px; box-shadow: 2px 2px 4px #444; padding-left: 2px; background-image: linear-gradient(rgb(255, 255, 255), rgb(228, 228, 228));');

*I've not tested this extensively on anything but profile pages, and it's certainly not optimized. I have other custom tweaks, so it's possible I've missed something. I tried to use the same egg svg gradient as the sidebar, but this if my first attempt at svg and I failed, so you get the solid color that I decided looked best. Void where prohibited. blah blah blah.
Heasleys4hemp [1468764] Committee Committee
Some updates:
  • fix personalstats page having two versions, where one was broken
  • added like 30 casino related links
  • changed other casino links to be chosen only after main casino page has been chosen
  • changed random link to click event instead of page load (allows control clicks in new tab)
TheBurninator [2744382]
This is awesome, thanks!

The only thing I would suggest adding is a setting to let you turn off the common city pages so it opens more of the obscure/user pages.
MedJester [2888870]
This is a great script, and thanks for being so willing to update it. It seems like there's equal weight for each linksarray, but they don't necessarily have the same number of links off of them, so many get repeated often? (e.g. I got Calendar twice out of 3 clicks.) Is there a way to weight the ones that have more potential for additional links?

Hope that makes sense. I learned to code in Pascal 30+ years ago and didn't make it a career path, so I'm a little rusty on terms.
MedJester [2888870]
The https://www.torn.com/newspaper.php array doesn't seem to be grabbing links from that page (or I'm just really unlucky getting the main multiple times without ever getting a derivative.

Also true of the https://www.torn.com/halloffame.php array. Maybe because they use a # vs a ? to call the data? (again, we're working well above my programming level.