10 ms·
Typically. For example, on reddit you can run this in console to downvote everything on a comment thread: $.each($(".down.arrow"), function(index, vote){ $
by duncanmcdowell 13y ago
Typically. For example, on reddit you can run this in console to downvote everything on a comment thread:
$.each($(".down.arrow"), function(index, vote){
$(vote).click();
});
- chengyinliu 13y agoJust curious, is there any reason you used `$.each` instead of `$(".down.arrow").each`?
- hayksaakian 13y agoseems like the more functional-style way of doing it
- k3n 13y agoProtip: you don't even need an each() at all[1]. So the above could be written: $(".down.arrow").click(); 1. http://jsfiddle.net/k6FvQ/ http://jsfiddle.net/k6FvQ/
- bendangelo 13y agoThis won't down vote everything. Votes get throttled, so I guess a setTimeout has to be used.
- k3n 13y agoThey also explicitly state that you are to make no more than 30 requests/minute[1], or restated, no more than once every 2 seconds. 1. https://github.com/reddit/reddit/wiki/API https://github.com/reddit/reddit/wiki/API
- baddox 13y agoThat's for the API. I don't think the official web site counts.
- k3n 13y agoThey also mention Greasemonkey scripts, which is functionally the same as running script from your console, so I believe it'd still apply. Either way, it's probably a good guide to follow if nothing else -- I mean, reddit still has near-daily capacity issues.