Skip to content

Instantly share code, notes, and snippets.

@erikzaadi
Created October 29, 2012 14:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save erikzaadi/3973829 to your computer and use it in GitHub Desktop.
Save erikzaadi/3973829 to your computer and use it in GitHub Desktop.
Unsubscribing to an entire organization at once
var auth_token = $("input[name='authenticity_token']")[0].value;
$("a.repo-name[href^='/THEORG']").each(function($elem){
$.post("/notifications/subscribe", {
authenticity_token : auth_token,
do : 'included',
'repository_id' : $("form.js-unsubscribe-form #repository_id", $(this).parent("li")).val()
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment