Skip to content

Instantly share code, notes, and snippets.

@danbugs
danbugs / gist:ea89501509eec425f43cf808b94d9bfe
Created July 15, 2025 23:54
Visually assign stations to Swiss matches on StartGG
# USAGE: Paste the code below onto your developer console in the Swiss phase bracket reporting admin view.
# It will replace the "Match is coming up" text w/ an input element w/ pre-assigned random stations from 1-15 and pick one as 'STREAM'.
# W/ it being an input element, you can then easily change the stream assignment, if you'd like.
(function replaceStrongWithEditableInputs() {
const strongs = Array.from(document.querySelectorAll('.activityStateColor-sggsOTPF.isCreated-sggks5JB.text-sm strong'));
if (strongs.length < 16) {
console.warn(`Expected at least 16 <strong> elements, found ${strongs.length}`);
return;
@danbugs
danbugs / gist:a4ead886131119a2b3da6a2c4c4a8dc4
Created July 11, 2025 16:28
Bulk remove all attendees in a StartGG bracket
// USAGE: Paste this in your browser's developer console from the admin 'Attendees' page and then run removeAllAttendees()
async function removeAllAttendees() {
let totalRemoved = 0;
let maxAttempts = 100;
let consecutiveFailures = 0;
while (maxAttempts > 0) {
// Count current attendees
const currentButtons = Array.from(document.querySelectorAll('button')).filter(btn => {