Skip to content

Instantly share code, notes, and snippets.

@dahabit
Forked from iamstuartwilson/slack-file-killer.js
Created October 4, 2017 13:01
Show Gist options
  • Save dahabit/2930b142897f8cc9e83492bba91ecf41 to your computer and use it in GitHub Desktop.
Save dahabit/2930b142897f8cc9e83492bba91ecf41 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