Created
May 23, 2013 18:48
-
-
Save erikpukinskis/5638476 to your computer and use it in GitHub Desktop.
Javascripts for doing bulk closing of Exceptional exceptions.
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
| grab = function(regex) { return $(".error h2 a").filter(function(i,a) { return $(a).attr("title").match(regex)}) } | |
| cb = function(regex) { return grab(regex).parent().parent().parent().find("input[type=checkbox]")} | |
| ids = function(regex) { return grab(regex).map(function(i,a) { return $(a).attr('href').split('/')[2]}).toArray().join(',') } | |
| // This will load all of your items onto the page: | |
| timer = setInterval(function() { $("#more-link-technology").trigger("more-me") }, 500) | |
| // Wait for the last page (if you have 1000 exceptions, the last page will be around 100). | |
| // Put a breakpoint at javascripts/application.js:911 at the $.post | |
| // Click an exception and hit close. It should hit your breakpoint. | |
| // Then you can do something like this in the console: | |
| $.post($(this).attr('href'), {error_ids: ids(/Weekly/)}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment