Skip to content

Instantly share code, notes, and snippets.

@Peter-Schorn
Created May 21, 2024 16:55
Show Gist options
  • Save Peter-Schorn/8bcf22c15189d90a490f1e4fcec67fc5 to your computer and use it in GitHub Desktop.
Save Peter-Schorn/8bcf22c15189d90a490f1e4fcec67fc5 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Auto-Refresh Tray Count
// @namespace http://tampermonkey.net/
// @version 2024-05-21
// @description try to take over the world!
// @author schornpe (Peter schorn)
// @match https://flow-sortation-na.amazon.com/*
// @match http://flow-sortation-na.amazon.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
setInterval(() => {
const button = document.querySelector("button.btn.btn-success.btn-block");
const success = button instanceof HTMLElement;
button?.click();
console.log(`refreshed tray count at ${Date()}; succeeded: ${success}`)
}, 15_000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment