Last active
April 3, 2024 22:36
-
-
Save Luen/e656791d2b30bbaaefa05e983e21b725 to your computer and use it in GitHub Desktop.
mark messages as done - need to right click the done button and that's it. // Script 2, hover over the mark as done button on left (should light up green)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
const selector = 'div[id] > span > div > div > div > i[data-visualcompletion="css-img"]'; | |
const clickElement = () => { | |
const element = document.querySelector(selector); | |
if (element) { | |
element.click(); | |
} else { | |
console.error('Element not found:', selector); | |
} | |
}; | |
setInterval(clickElement, 1000); | |
})(); | |
// or | |
(function() { | |
const selector = 'div[role="presentation"] div[role="grid"] div[id^="js_"] a[role="row"]'; | |
const clickElement = () => { | |
const element = document.querySelector(selector); | |
if (element) { | |
element.click(); | |
console.log('Button clicked'); | |
} else { | |
console.error('Element not found:', selector); | |
} | |
}; | |
setInterval(clickElement, 1000); | |
})(); | |
// Click everyone checkbox to invite people: | |
const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
(async () => { | |
// Find all input elements of type 'checkbox' | |
const inputs = document.querySelectorAll('input[type="checkbox"]'); | |
// Loop through each input | |
for (let input of inputs) { | |
input.click(); // Click the input | |
await delay(1); // Wait for 1ms before continuing | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment