Skip to content

Instantly share code, notes, and snippets.

@noromanba
Last active March 13, 2016 19:28
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 noromanba/92fbdb82b94196e69e8d to your computer and use it in GitHub Desktop.
Save noromanba/92fbdb82b94196e69e8d to your computer and use it in GitHub Desktop.
hidden comments on plus.google.com for UserScript
// ==UserScript==
// @name G+ denoiser
// @namespace http://noromanba.flavors.me
// @description hidden comments on plus.google.com for UserScript
// @include *://plus.google.com/*
// @grant none
// @noframes
// @run-at document-start
// @version 2016.3.13.0
// @homepage https://gist.github.com/noromanba/92fbdb82b94196e69e8d
// @downloadURL https://gist.github.com/noromanba/92fbdb82b94196e69e8d/raw/g-plus-denoiser.user.js
// @license MIT License http://nrm.mit-license.org/2016
// @author noromanba http://noromanba.flavors.me
// @icon https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/NYCS-bull-trans-G.svg/32px-NYCS-bull-trans-G.svg.png
// @icon64 https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/NYCS-bull-trans-G.svg/64px-NYCS-bull-trans-G.svg.png
// ==/UserScript==
// Icon (PD by Flamurai)
// https://commons.wikimedia.org/wiki/File%3ANYCS-bull-trans-G.svg
// Devel
// https://gist.github.com/noromanba/92fbdb82b94196e69e8d
(() => {
if (!/plus\.google\.com$/.test(location.hostname)) {
return;
}
const addStyle = (() => {
const parent = document.head || document.body || document.documentElement;
const style = document.createElement('style');
style.type = 'text/css';
parent.appendChild(style);
return (css) => {
style.appendChild(document.createTextNode(css + '\n'));
};
})();
addStyle([
'[role="toolbar"]+[role="button"]',
'[role="toolbar"]~[role="region"]',
'[role="complementary"]',
'.DM',
'[jscontroller][jsaction] [jsmodel][id^="update-"]'
] + '{ display: none !important; }');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment