Skip to content

Instantly share code, notes, and snippets.

@dzoba
Last active December 16, 2015 04:48
Show Gist options
  • Save dzoba/086f86d743ba3e21b6ab to your computer and use it in GitHub Desktop.
Save dzoba/086f86d743ba3e21b6ab to your computer and use it in GitHub Desktop.
Slack doesn't provide an easy way to clear general channel history
// 1) Install this plugin:
// https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija/related?hl=en
// 2) Go to this page:
// https://my.slack.com/archives/general
// 3) Use this code:
setTimeout(function() {
$('.moscow_red.cursor_pointer').click()
setTimeout(function() {
$('#batch_delete_div .cursor_pointer')[0].click()
}, 50);
setTimeout(function(){
$('.btn_danger').click()
}, 150);
setTimeout(function(){
$('.dialog_go').click()
}, 350);
$('.generic_dialog').on('hidden.bs.modal', function (e) {
location.reload();
})
}, 3000);
// 4) Leave the tab open and go do something else for a while...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment