Skip to content

Instantly share code, notes, and snippets.

@lanmaster53
Last active November 27, 2018 21:14
Show Gist options
  • Save lanmaster53/26a625d1fe8a6bb68997182a29d2c0ff to your computer and use it in GitHub Desktop.
Save lanmaster53/26a625d1fe8a6bb68997182a29d2c0ff to your computer and use it in GitHub Desktop.
Google Voice Purge Developer Console Script
/*
Copy and paste this into the developer console for any view of the legacy Google Voice browser interface.
This script will page through and delete all objects in the view using keyboard shortcuts (51 = `#` = move to trash).
There is no shortcut for deleting objects permanently from trash. Trash is purged after 30 days according to Google.
*/
window.setInterval(function(){
document.getElementsByClassName('jfk-checkbox-checkmark')[0].click();
var e2 = new KeyboardEvent("keydown", {view: window, key: "#",keyIdentifier: "U+0023", code: 'Digit3', shiftKey: true, bubbles: true, cancelable: true});
delete e2.which;
delete e2.keyCode;
Object.defineProperty(e2, "which", {"value" : 51});
Object.defineProperty(e2, "keyCode", {"value" : 51});
document.getElementsByClassName('gc')[0].dispatchEvent(e2);
},1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment