Created
May 16, 2013 14:02
-
-
Save weisjohn/5591954 to your computer and use it in GitHub Desktop.
Twitter DM cleanup, use with caution inside a browser session on the site.
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
// global used to stop things if it get's out of hand | |
var run = true; | |
function enter_dm() { | |
var li = $(".dm-thread-list.js-dm-thread-list").children("li")[5]; | |
$(li).click(); | |
} | |
function click_delete() { | |
$(".dm-delete.js-dm-delete").last().click(); | |
} | |
function confirm_delete() { | |
$(".btn.caution-btn.js-prompt-ok").click() | |
} | |
function ret_to_messages() { | |
$("a.js-dm-header-title").click(); | |
} | |
function cycle() { | |
// do stuff | |
if (run) { | |
enter_dm(); | |
setTimeout(function() { | |
click_delete(); | |
}, 500); | |
setTimeout(function() { | |
confirm_delete(); | |
}, 1000); | |
setTimeout(function() { | |
ret_to_messages(); | |
}, 2000); | |
// rinse & repeat | |
setTimeout(function() { | |
cycle(); | |
}, 3000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment