Skip to content

Instantly share code, notes, and snippets.

@alexpaluzzi
Created January 23, 2017 20:07
Show Gist options
  • Select an option

  • Save alexpaluzzi/b90881882ee7e6ce44590145447e86fd to your computer and use it in GitHub Desktop.

Select an option

Save alexpaluzzi/b90881882ee7e6ce44590145447e86fd to your computer and use it in GitHub Desktop.
Archive everything in Google Voice (Classic) - Web
(()=>{
function select() {
document.getElementsByClassName('jfk-checkbox-checkmark')[0].click()
};
function archive() {
function triggerMouseEvent(node, eventType) {
let clickEvent = document.createEvent('MouseEvents');
clickEvent.initEvent(eventType, true, true);
node.dispatchEvent(clickEvent);
}
let node = document.getElementsByClassName('gc-appbar-buttons-left')[0].childNodes[1];
triggerMouseEvent(node, "mouseover");
triggerMouseEvent(node, "mousedown");
triggerMouseEvent(node, "mouseup");
};
function go() {
setInterval(() => {
select();
setTimeout(() => {
archive();
}, 700)
}, 2500);
}
go();
})()
@alexpaluzzi

Copy link
Copy Markdown
Author

Go to https://www.google.com/voice/b/0#inbox (make sure you're in Classic).
Open dev tools (F12).
Paste above block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment