Created
February 16, 2013 17:58
-
-
Save danlamanna/4967943 to your computer and use it in GitHub Desktop.
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
interactive("assembla-spot-check-space-urls", "Loads n URLs with random space IDs.", | |
function assembla_spot_check(I) { | |
var url_format = yield I.minibuffer.read($prompt = "Assembla URL (with %s where space-id should belong): "); | |
var num_spaces = yield I.minibuffer.read($prompt = "Number of spot checks: "); | |
if (num_spaces > assembla_space_ids.length) { | |
I.window.minibuffer.message("Number of spot checks exceeds number of space IDs known, performing " + assembla_space_ids.length + " instead."); | |
num_spaces = assembla_space_ids.length; | |
} | |
for (i=0;i<num_spaces;i++) { | |
load_url_in_new_buffer(url_format.replace("%s", | |
assembla_space_ids[Math.floor(Math.random()*assembla_space_ids.length)]); | |
} | |
I.window.minibuffer.message("Opened " + num_spaces + " new buffers."); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment