News for hackers. Stuff that matters.
Re:Unsubscribe from all LinkedIn email in one click by jgmmo on Thursday October 17, 2013 @01:36PM (#6566857)
cool idea. Can this be done for many sites? like macros that take advantage of the site's own JS.
Re:Unsubscribe from all LinkedIn email in one click by chengyinliu on Thursday October 17, 2013 @01:48PM (#6566934)
I don't think it would be easy to write a global one for every site, but I think it would be cool to make a community-driven unsubscribe script collection.
Re:Unsubscribe from all LinkedIn email in one click by georgemcbay on Thursday October 17, 2013 @02:07PM (#6567083)
While there would be some positive aspects of something like that, you'd either have to have it moderated strictly by a trusted moderator or make sure every user understood every line of all code they were executing from the site.

The potential for scripts that did very bad things is immense, especially given how easily you can massively obfuscate JavaScript code.

Re:Unsubscribe from all LinkedIn email in one click by duncanmcdowell on Thursday October 17, 2013 @01:48PM (#6566945)
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(); });

Re:Unsubscribe from all LinkedIn email in one click by bendangelo on Thursday October 17, 2013 @02:10PM (#6567109)
This won't down vote everything. Votes get throttled, so I guess a setTimeout has to be used.
Re:Unsubscribe from all LinkedIn email in one click by k3n on Thursday October 17, 2013 @02:40PM (#6567312)
They 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

Re:Unsubscribe from all LinkedIn email in one click by baddox on Thursday October 17, 2013 @02:43PM (#6567326)
That's for the API. I don't think the official web site counts.
Re:Unsubscribe from all LinkedIn email in one click by k3n on Thursday October 17, 2013 @02:45PM (#6567338)
They 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.

Re:Unsubscribe from all LinkedIn email in one click by chengyinliu on Thursday October 17, 2013 @01:52PM (#6566977)
Just curious, is there any reason you used `$.each` instead of `$(".down.arrow").each`?
Re:Unsubscribe from all LinkedIn email in one click by k3n on Thursday October 17, 2013 @02:36PM (#6567290)
Protip: you don't even need an each() at all[1].

So the above could be written:

$(".down.arrow").click();

1. http://jsfiddle.net/k6FvQ/

Re:Unsubscribe from all LinkedIn email in one click by hayksaakian on Thursday October 17, 2013 @02:10PM (#6567106)
seems like the more functional-style way of doing it
Re:Unsubscribe from all LinkedIn email in one click by fourstar on Thursday October 17, 2013 @04:06PM (#6567792)
Yeah, if there is jQuery or some other library available. Otherwise just fetch jQuery from the console and append it to the page, and do so.
Re:Unsubscribe from all LinkedIn email in one click by tlrobinson on Thursday October 17, 2013 @04:25PM (#6567892)
Or, you know, don't use jQuery.