Skip to content

Instantly share code, notes, and snippets.

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 ricklamers/84a3dc67c176e0a3c53bd1caa44f91d1 to your computer and use it in GitHub Desktop.
Save ricklamers/84a3dc67c176e0a3c53bd1caa44f91d1 to your computer and use it in GitHub Desktop.
A simple userscript to hide promoted tweets on twitter.com
// ==UserScript==
// @name Lazyfoo Readable CSS
// @namespace codesthings.com
// @license MIT
// @version 1.1
// @description Adds a readable CSS to Lazyfoo's tutorials.
// @author JamesCodesThings
// @match *://*.twitter.com/*
// @grant GM_addStyle
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle('div[data-testid="placementTracking"]:has(path[d="M19.498 3h-15c-1.381 0-2.5 1.12-2.5 2.5v13c0 1.38 1.119 2.5 2.5 2.5h15c1.381 0 2.5-1.12 2.5-2.5v-13c0-1.38-1.119-2.5-2.5-2.5zm-3.502 12h-2v-3.59l-5.293 5.3-1.414-1.42L12.581 10H8.996V8h7v7z"]) { display: none; }');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment