Skip to content

Instantly share code, notes, and snippets.

@fifty-six
Last active November 11, 2021 03:08
Show Gist options
  • Save fifty-six/9848cffe458b4d35fa68a6b1ac58b005 to your computer and use it in GitHub Desktop.
Save fifty-six/9848cffe458b4d35fa68a6b1ac58b005 to your computer and use it in GitHub Desktop.
SRC Auto-verify button for Verifiers
// ==UserScript==
// @name SRC Auto-verify button for Verifiers
// @namespace Violentmonkey Scripts
// @match https://www.speedrun.com/*/editrun/*
// @match https://www.speedrun.com/*/run/*/edit
// @grant none
// @version 1.0
// @author 56
// @description i am the impostor from among us
// ==/UserScript==
let form = document.getElementById("editrunform");
let elem = document.createElement("div");
elem.className = "form-group row"
let column = elem.appendChild(document.createElement("div"));
column.className = "col-md-5 offset-md-5";
let control = column.appendChild(document.createElement("div"));
control.className = "custom-control custom-checkbox mt-2";
let checkbox = control.appendChild(document.createElement("input"));
checkbox.type = "checkbox";
checkbox.className = "custom-control-input";
checkbox.id = checkbox.name = "autoverify";
let label = control.appendChild(document.createElement("label"));
label.className = "custom-control-label";
label.htmlFor = "autoverify";
label.innerText = "Automatically verify run";
// Get the submit button and place it before that
form.children[form.children.length - 1].before(elem)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment