-
-
Save ricklamers/84a3dc67c176e0a3c53bd1caa44f91d1 to your computer and use it in GitHub Desktop.
A simple userscript to hide promoted tweets on twitter.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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