Skip to content

Instantly share code, notes, and snippets.

@redaphid
Created May 30, 2025 21:20
Show Gist options
  • Save redaphid/99d5a0f994442e3e06bb258ef7908af0 to your computer and use it in GitHub Desktop.
Save redaphid/99d5a0f994442e3e06bb258ef7908af0 to your computer and use it in GitHub Desktop.
LeaseSigner 3000 (tm) Userscript
// ==UserScript==
// @name LeaseSigner 3000 (tm)
// @namespace hypnodroid
// @match https://www.on-site.com/web/signatures/*
// @grant none
// @version 1.0
// @author -
// @description Signs leases from on-site for you
// ==/UserScript==
const timeout = (ms=delay) => new Promise((resolve) => setTimeout(resolve, ms))
const delay = 500
async function step() {
console.log('step')
await timeout(50)
console.log('step2')
const highlights = [...document.getElementsByClassName('initialHL')];
await timeout(delay)
if (!highlights.length) { console.log('done?')}; // done - nothing left to click
const signatures = [...document.getElementsByClassName('signature')]
signatures.forEach(el => el.click());
await timeout(delay)
highlights.forEach(el => el.click()); // click every highlight
await timeout(delay)
document.getElementsByClassName('okClickSignature')[0]?.click();
await timeout(delay)
document.getElementsByClassName('goto_next_page')[0]?.click();
await timeout(delay * 2)
step()
}
step()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment