-
-
Save bruab/aef43c804064583b0665bbff7ab8e479 to your computer and use it in GitHub Desktop.
Tampermonkey userscript to hide sidebars, DMs, feed, and notifications when you visit https://www.linkedin.com/feed/?poast
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 LinkedIn | Hide sidebars | |
// @namespace https://briandavidhall.com | |
// @version 0.1 | |
// @description remove distractions on linkedin so i can poast | |
// @author You | |
// @match https://www.linkedin.com/feed/?poast | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
var toHide = [ | |
'.scaffold-layout__aside', // right sidebar | |
'.scaffold-layout__sidebar', // left sidebar | |
'#msg-overlay', // messages | |
'div.scaffold-finite-scroll--infinite', // timeline | |
'[href="/notifications/"] .notification-badge', // top nav > notifications badge | |
'[href="/messaging/"] .notification-badge' // top nav > messages badge | |
]; | |
toHide.forEach(hide); | |
function hide(selector) { | |
var element = document.querySelector(selector); | |
if (!element) return setTimeout(function () { hide(selector); }, 100); | |
element.style.visibility = 'hidden'; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment