Skip to content

Instantly share code, notes, and snippets.

@neatshell
Last active December 10, 2020 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neatshell/8b59c54cf8278fb6fa7f3d748c60eb98 to your computer and use it in GitHub Desktop.
Save neatshell/8b59c54cf8278fb6fa7f3d748c60eb98 to your computer and use it in GitHub Desktop.
(function(org, notificationType) {
// org:
// the organizazione name
// notificationType:
// 'included' = participating and @mentions,
// 'subscribed' = all activity,
// 'ignore' = ignore
let qx = $x;
let unwatch = function(org, notificationType) {
let nodes = document.querySelectorAll('.Box-row');
let rows = [ ...nodes ];
let orgRows = rows.filter(e => e.innerText.startsWith(`${org}/`));
let orgUnsubButtons = orgRows.map(row => row.querySelector(`button.SelectMenu-item[value="${notificationType}"]`));
orgUnsubButtons.forEach(button => console.log(button.click()));
setTimeout(function() {
}, 1000);
};
unwatch(org, notificationType);
})('TheOrganizationName', 'included');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment