Created
February 9, 2012 18:35
-
-
Save dotzero/1781875 to your computer and use it in GitHub Desktop.
CloupApp Select all
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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