Skip to content

Instantly share code, notes, and snippets.

@iamstuartwilson
Last active August 8, 2018 20:58
Show Gist options
  • Save iamstuartwilson/a54eac64116941990a95 to your computer and use it in GitHub Desktop.
Save iamstuartwilson/a54eac64116941990a95 to your computer and use it in GitHub Desktop.
Kill multiple slack files from your browser console. Simply paste this code when on the "https://[space].slack.com/files/[me]" page.
(function(){
$('#files_list > [data-file-id]').each(function(i) {
killIt($(this).attr('data-file-id'));
function killIt(id) {
console.log(id);
$.post('/api/files.delete', {
file: id,
token: boot_data.api_token
}, function(data) {
console.log(data);
});
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment