Cassandra Confluvium Better UI/UX

Userscript for Tampermonkey Browser ExtensionMay 2019 - Present

https://github.com/heyjames/cassandra-site-helper
Double-click highlighting copies trailing white space
Before
Before
After
After
After
Admin view with player search

This script uses the Tampermonkey extension to add quality-of-life features to the Insurgency: Sandstorm tactical community website Confluvium Gaming.

The website was unfortunately designed to unintentionally cause a user to include the trailing whitespace when copying the IP address, a condition that prevents connecting to the server in the game client. Using a single button to copy the IP address saves time and effort, while allowing me to connect faster than others for the last player slot on this popular server (yes, this has happened a lot). Although this script began as a simple button to copy the IP address, many other features were developed as a moderation tool and to improve the user experience.

Features

Special Features for moderation (closed source)

Default Features

The Original Inconvenience Problem

Without this script, a user can double-click and drag the IP address at the website and press CTRL+C to copy the IP address, but this also copies trailing whitespace. The alternative is to carefully single-click and drag the IP address and stop precisely before the trailing white space. Both scenarios require increased hand-eye coordination and takes about 5 and 8 user actions, respectively, compared to 2 with this script enabled.

Tools

Notes

Google Chrome is currently unsupported due to its security implementation around iFrames. Neither the current copy text method or Clipboard API will work.

There is no ID or class selector asssociated with the IP address (or any value) in its HTML, which requires splitting the contents of the iFrame by <br> and isolating the IP address. Alternatively, selecting the first instance of an IP address with Regex should work, too. The Clipboard API does not work, so the workaround requires creating an hidden input field to simulate a user select and user copy action.