Skip to content

Instantly share code, notes, and snippets.

@dafi
Created May 29, 2012 11:51
Show Gist options
  • Save dafi/2828027 to your computer and use it in GitHub Desktop.
Save dafi/2828027 to your computer and use it in GitHub Desktop.
Remove posts from g+ containing specific words
// ==UserScript==
// @name gplus
// @namespace http://dafi.plus
// @include plus.google.com
// @version 1
// ==/UserScript==
[].forEach.call(document.querySelectorAll('div.jn.gu'), function(e) {
var text = e.firstChild
&& e.firstChild.textContent.toLowerCase();
if (text && (text.indexOf('terremot') != -1)) {
for (; e; e = e.parentNode) {
if (e.id && (e.id.indexOf('update') != -1)) {
e.style.display = "none";
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment