Skip to content

Instantly share code, notes, and snippets.

@ManicJamie
Last active July 19, 2023 12:24
Show Gist options
  • Save ManicJamie/e5c7855c9827da07ad8390c28fd6673b to your computer and use it in GitHub Desktop.
Save ManicJamie/e5c7855c9827da07ad8390c28fd6673b to your computer and use it in GitHub Desktop.
SRC auto-verify button for verifiers
// ==UserScript==
// @name SRC auto-verify for verifiers
// @namespace Violentmonkey Scripts
// @match *://www.speedrun.com/*/runs/*/edit
// @grant none
// @version 1.0
// @author -
// @description Add button to edit page for SRC verifiers for new layout as of 17/07/2023
// ==/UserScript==
function addButton() {
var elementList = document.getElementsByClassName("space-y-6 p-4");
var otherDetails = elementList[4];
otherDetails.innerHTML = otherDetails.innerHTML + `<div class="inline-flex flex-row items-center justify-start gap-x-3"><button class="x-input-switch" id="headlessui-switch-:rcr:" role="switch" type="button" tabindex="0" aria-checked="false" data-headlessui-state="" aria-labelledby="headlessui-label-:rcs:"><span aria-hidden="true" class="x-input-switch-circle"></span></button><div class="text-sm leading-6"><label class="cursor-pointer font-medium" id="headlessui-label-:rcs:">Automatically verify run</label></div></div>`;
}
window.addEventListener('load', () =>
{
setTimeout(addButton, 2000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment