diff options
Diffstat (limited to 'hidden/2015-09-07-removing-collaborator-spam-from-your-github-feed.md')
| -rw-r--r-- | hidden/2015-09-07-removing-collaborator-spam-from-your-github-feed.md | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/hidden/2015-09-07-removing-collaborator-spam-from-your-github-feed.md b/hidden/2015-09-07-removing-collaborator-spam-from-your-github-feed.md new file mode 100644 index 0000000..5ab5aef --- /dev/null +++ b/hidden/2015-09-07-removing-collaborator-spam-from-your-github-feed.md @@ -0,0 +1,79 @@ +--- +title: Removing "Collaborator Spam" from Your GitHub Feed +route: /github-collaborator-spam +date: 2015-09-07 +description: Devious GitHub users are adding prominent members as collaborators to their repositories in an attempt to gain exposure. Here's how to stop it. +hidden: true +--- + +I'm sick of seeing this garbage on GitHub. + + + +Project owners shamelessly adding dozens upon dozens of famous open source developers, in an attempt to get a link to their project on as many GitHub feeds as possible (while [chalking it up to "username errors"](https://github.com/joni2back/angular-filemanager/issues/59)). To be honest, I don't really care what repositories my friends get added to - even if legitimately. The feature has never proven useful to me. + +**Here's how to get rid of it.** + +## Using [AdBlock Plus](https://adblockplus.org/) + +We can remove the spammy elements from the page using a custom AdBlock filter. First, open up your extension settings (I'm using Chrome): + + + +Then, click the "Add your own filters" tab, enter the following filter string, and click "Add Filter": + +``` +github.com##.alert.member_add +``` + + + +This filter is made up of three parts: + +- `github.com` - the domain on which to filter +- `##` - a separator +- `.alert.member_add` - the CSS selector, matching the various `<div class="alert member_add simple">` elements containing the spam + +Refresh your GitHub tab, and rejoice in your spam-free activity feed. + +## Using a custom userscript + +Alternatively, you can use the following userscript. + +```js +// ==UserScript== +// @name Remove collab spam +// @description Removes "X added Y to Z" spam from the GitHub activity feed +// @include https://github.com/* +// ==/UserScript== +// +// by @jdan <http://thatjdanisso.cool> +// MIT Licensed + +;[].slice + .call(document.querySelectorAll(".alert.member_add")) + .forEach(function(item) { + item.remove() + }) +``` + +Copy and paste the above code into your favorite editor and save it as **remove-collab-spam.user.js**. In Chrome, you can simply drag this file into **chrome://extensions**. + +On Firefox, install [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/) and navigate to the Greasemonkey "User scripts" tab of **about:addons**. + + + +Drag the file here, then accept the following confirmation dialog. + + + +You can even customize the userscript to remove/keep elements containing particular usernames if you're into that sort of thing. + +```js +// Always show tj-related activity items +if (!/\/tj/.test(item.innerHTML)) { + item.remove() +} +``` + +But I think we can safely remove 'em all :) |