Skip to content

Instantly share code, notes, and snippets.

@coderaiser
Last active December 15, 2015 12:39
Show Gist options
  • Select an option

  • Save coderaiser/5261776 to your computer and use it in GitHub Desktop.

Select an option

Save coderaiser/5261776 to your computer and use it in GitHub Desktop.
Bookmarklet removes all files from filepicker.io page.
(function(){
'use strict';
var REMOVE_URL = '/apps/' + server_vars.apikey + '/console/remove/',
Files = $('tr.filelink');
for(var i = 0; i < Files.length; i++){
$.ajax({
url: REMOVE_URL,
data: {'handle': $(Files[i]).data('handle')},
type: 'POST',
success: function() {
},
error: function(a, b, c) {
console.log('Error deleting file, please try again. If the issue persists, please contact support@filepicker.io and we\'ll get right on it.');
}});
Files[i].remove();
}
})()
javascript:(function(){var b="/apps/"+server_vars.apikey+"/console/remove/",f=$("tr.filelink");for(var a=0;a<f.length;a++)$.ajax({url:b,data:{handle:$(f[a]).data("handle")},type:"POST",success:function(){},error:function(){console.log("Error deleting file, please try again. If the issue persists, please contact support@filepicker.io and we'll get right on it.")}}),f[a].remove()})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment