-
Notifications
You must be signed in to change notification settings - Fork 0
/
trash.user.js
31 lines (27 loc) · 867 Bytes
/
trash.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// ==UserScript==
// @name Trash Can (Word Bank) automation
// @namespace https://waa.ai/spinpy
// @version 1.1
// @description Automatically add words to the word bank!
// @author Spinfal
// @match https://word-bank.imaybeme.repl.co
// @match https://word-bank.imaybeme.repl.co/submit
// @grant none
// ==/UserScript==
(function() {
'use strict';
async function lol() {
let res;
try {
res = await fetch('https://random-word-api.herokuapp.com/word?number=1', {
method: "GET"
})
res = await res.json();
} catch(e) {
return console.log(e);
}
document.getElementById('text').value = res[0];
document.getElementsByClassName('btn')[0].click();
}
setInterval(function() { lol(); }, 1000);
})();