Enhanced Userscript for Classic Tease Snakes and Ladders and Lotteries

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 795
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Enhanced Userscript for Classic Tease Snakes and Ladders and Lotteries

Post by PlayfulGuy »

Some time ago user BluNote posted A Snakes and Ladders Toolkit that made classic snakes and ladders games somewhat easier. Recently I decided that script needed an upgrade.

The result (screenshot below) is a much enhanced version of the original that eliminates the need to edit URL's entirely, providing in page controls to handle all circumstances, as well as keyboard shortcuts for most of them, so you can easily play these classic snakes and ladders games, and lottery style games.

The script was developed and tested in Tampermonkey. Don't know if it will work in GreaseMonkey (I've never used it).
Download the upgraded script here: mega download (Updated to version 1.2 Jan 12/2024)

Enhancements

On ALL classic teases:
  • URL's (hyperlinks) in the page text are converted to clickable links.
  • Page text like "go to page 27" is turned into a clickable link that goes to the proper page.
Snakes and Ladders and Lottery games
On classic teases whose title contains any of the words snake(s), ladder(s) or lottery it also does the following:
Note: These features can be activated on all classic teases by setting a variable in the script.
  • Adds custom controls to the page for rolling the next page, rolling random numbers or jumping to specific pages within the tease. By default the controls are placed so they are right after the tease text instead of below everything. You can change this by selecting the parent div in the code.
  • Lottery mode is automatically selected if the tease title contains the word lottery.
    The script tries (usually successfully) to detect the min and max values to roll by examining the text on the first few pages of the tease.
  • Limits the width of the tease image so the tease text and controls remain on the right instead of being pushed below it on wider images. For teases that use portrait mode images this usually works fine. For teases that use a lot of landscape format pictures they images often get reduced in size quite a bit. You can disable this in the customization options in the script.
  • Automatically detects the target page for snakes and ladders games (in the majority of cases)
  • The "Continue" link is automatically updated to go to the proper page. The "Continue" link will NOT be updated if instructions in the page say anything like "do something or other then click continue instead"
  • If a Snake or Ladder is detected the "Continue" link changes to "Snake" or "Ladder" appropriately.
  • A Random # button and input fields is added so you can generate random numbers right on the page. In most cases the min and max values are automatically detected and put in the appropriate fields, so all you have to do is click the button to get the result.
  • For snakes and ladders games the last roll is displayed next to the min/max fields
  • Shortcut keys added so keyboard navigation is much easier
    • Key Action
    • a = Generate random number
    • c = Click the Continue link. This works even if link is updated to say "Roll" or "Ladder to..." etc. (space bar also works)
    • r = Roll for the next page and go to it
    • g = Go to the entered page (see p for page number field)
    • m = Set numbers for "Random #". Pressing "m" selects the min number field.
      Enter a min and/or press tab to get to the max field, enter max if needed, then press "a" to generate the number
    • n = Selects the "min" input field for the Roll button
    • x = Selects the "max" input field for the Roll button
    • p = Activate the page number input field (for go to)
  • In the unlikely event you might need to edit the url, you can use the supplied "Go to Page" controls instead.
    With the above shortcut keys, to go to page 30 for example, you would press p to get to the page number field,
    type 30 for the page number, and press g for go. So you just type "p30g". Easy peasy!
  • I've also included samples in the code of modifying the behavior to address issues in specific teases. Search the script for teaseID.
Enjoy, and please let me know if you find any issues.

PG
Milovana Toolkit.png
Milovana Toolkit.png (837.23 KiB) Viewed 2943 times
Last edited by PlayfulGuy on Fri Jan 12, 2024 4:51 pm, edited 2 times in total.
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 323
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: Enhanced Userscript for Classic Tease Snakes and Ladders and Lotteries

Post by FrozenWolf »

Thanks very much for this, I can see there's a lot of work that's gone into that script, and I appreciate the options that you've provided too. I often end up giving up when trying to write anything extensive in JavaScript because I find the language so finicky, so kudos on being able to produce something that long that works!
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 795
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: Enhanced Userscript for Classic Tease Snakes and Ladders and Lotteries

Post by PlayfulGuy »

I've made some updates to this userscript (link in original post updated) to fix issues I encountered in a few teases.
The new script version is 1.1

Enjoy!
CuriousAirplane
Curious Newbie
Curious Newbie
Posts: 1
Joined: Tue Aug 17, 2021 8:37 pm
Gender: Male
Sexual Orientation: Straight

Re: Enhanced Userscript for Classic Tease Snakes and Ladders and Lotteries

Post by CuriousAirplane »

Thanks for the script. Looks really useful. It's nice to have a random number generator already on the page so you don't have to open random.org in a different window,

One thing I noticed: As you remove the href attribute from the "(R)oll" link in line 594, it no longer shows a pointer cursor. You could fix this by inserting the following line at line 595:

Code: Select all

continueLink.style.cursor = "pointer";
I don't like it when actionable elements like links have the standard text cursor, as this does not indicate that something will happen if I click the link.
User avatar
PlayfulGuy
Explorer At Heart
Explorer At Heart
Posts: 795
Joined: Sat Jul 07, 2012 10:08 pm
Gender: Male
Sexual Orientation: Bisexual/Bi-Curious
I am a: Switch
Dom/me(s): No domme
Sub/Slave(s): No sub
Location: British Columbia, Canada

Re: Enhanced Userscript for Classic Tease Snakes and Ladders and Lotteries

Post by PlayfulGuy »

CuriousAirplane wrote: Thu Jan 11, 2024 6:58 pm Thanks for the script. Looks really useful. It's nice to have a random number generator already on the page so you don't have to open random.org in a different window,

One thing I noticed: As you remove the href attribute from the "(R)oll" link in line 594, it no longer shows a pointer cursor. You could fix this by inserting the following line at line 595:

Code: Select all

continueLink.style.cursor = "pointer";
I don't like it when actionable elements like links have the standard text cursor, as this does not indicate that something will happen if I click the link.
Thanks for that! I didn't know why that happened or how to fix it so it's much appreciated. It didn't bother me much because I mostly use the keyboard shortcuts so I just forgot about it, but it's sure nice to have it fixed.

It's also nice to know someone else found the script useful.

I've added your fix, along with some other fixes I added for a couple teases, and updated the script to version 1.2.
Download here (I also updated the link in the first post)

Thanks again,

PG
Post Reply

Who is online

Users browsing this forum: mctop145 and 39 guests