Skip to content

Instantly share code, notes, and snippets.

@jkctech
Last active January 23, 2023 14:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jkctech/1268afd85627eec94cd07c177fde5e70 to your computer and use it in GitHub Desktop.
Save jkctech/1268afd85627eec94cd07c177fde5e70 to your computer and use it in GitHub Desktop.
Mass delete Gyazo pictures on your account page through some JavaScript
// Select all visible items on the page
function selall()
{
$(".checkmark").trigger("click");
}
// Execute deletion
function del()
{
// Select all
selall();
// 2 Seconds to finish selecting items
setTimeout(function(){
// Find the sidebar delete button and click it
$(".explorer-overlay-side-block-items").find("li").trigger("click");
// 500ms delay for modal
setTimeout(function(){
// Click delete button
$(".btn-danger").trigger("click");
}, 500);
}, 2000);
}
// Add buttons to navbar
$(".extra-object").append('<button onclick="del()" class="btn btn-warning" style="margin-right: 8px;">Delete All</button>');
$(".extra-object").append('<button onclick="selall()" class="btn btn-info">Select All</button>');
function selall(){$(".checkmark").trigger("click")}function del(){selall(),setTimeout(function(){$(".explorer-overlay-side-block-items").find("li").trigger("click"),setTimeout(function(){$(".btn-danger").trigger("click")},500)},2e3)}$(".extra-object").append('<button onclick="del()" class="btn btn-warning" style="margin-right: 8px;">Delete All</button>'),$(".extra-object").append('<button onclick="selall()" class="btn btn-info">Select All</button>');

There is (currently) no easy way to mass select or mass delete your captures on Gyazo. If you would like to delete all your captures without much hassle, try this script. (Last tested on 1st of May 2020)

Copy paste the contents of gyazodel.min.js in a chrome developer console on https://gyazo.com/captures.

2 buttons will appear in the navbar.

Click the "Delete All" button to execute an automatic mass deleter for all visible items (this will take about 5 seconds to complete).

Click the "Select All" button to only mass select all visible items.

After deleting a couple of items, the Gyazo UI likes to get glitched. Reload the page and repeat the mentioned steps above.

@TCNOco
Copy link

TCNOco commented Jan 23, 2023

Hey! Thanks for this. I've updated it and added another, much faster script that interacts directly with the Gyazo API, as you do when you click on the page. It's here https://gist.github.com/TCNOco/9fd372e229e32a7f442ebec45d8fa088
This is more focused towards those looking to delete most, if not all, of their images.

I have also updated the above to add the buttons, as the CSS selectors have changed a little.

Great script, regardless, even now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment