-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrules.txt
31 lines (21 loc) · 1.19 KB
/
rules.txt
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
// Click `<button type="submit">` if it exists
document.querySelector('[type="submit"]')?.click();
/* ========================================================================== */
// Update value of `<input name="fullname">`
const fullName = document.querySelector('[name="fullname"]');
if (fullName) fullName.value = 'Bob Smith';
/* ========================================================================== */
// Check `<input type="checkbox" name="terms">`
const terms = document.querySelector('[name="terms"]');
if (terms) terms.checked = true;
/* ========================================================================== */
// Put focus on `<input id="username">` if it exists
document.getElementById('username')?.focus();
/* ========================================================================== */
// Add autocomplete="off" to `<form action="/post">` if it exists
document.querySelector('form[action="/post"]')?.setAttribute('autocomplete', 'off');
/* ========================================================================== */
// Change background color to skyblue
document.body.style.backgroundColor = 'skyblue';
// -OR-
document.body.setAttribute('style', 'background-color: skyblue;');