Created
January 23, 2017 20:07
-
-
Save alexpaluzzi/b90881882ee7e6ce44590145447e86fd to your computer and use it in GitHub Desktop.
Archive everything in Google Voice (Classic) - Web
This file contains 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 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(); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Go to https://www.google.com/voice/b/0#inbox (make sure you're in Classic).
Open dev tools (F12).
Paste above block.