Instantly share code, notes, and snippets.

Embed
What would you like to do?
CloupApp Select all
// ==UserScript==
// @name CloupApp Select all
// @match http://my.cl.ly/*
// @author dotzero
// @description Add Select All button to CloudApp web interface
// ==/UserScript==
function main() {
$('#toolbar').prepend('<li><a class="button" href="#" id="selall">Select all</a></li>');
$('#selall').on("click", function(event){
event.preventDefault();
$('#listing').find('input:checkbox').click();
});
}
function insert(callback) {
var script = document.createElement("script");
script.textContent = "(" + callback.toString() + ")();";
document.body.appendChild(script);
}
insert(main);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment