Last active
March 10, 2023 05:52
-
-
Save IoIxD/42725696c469657e6891fdd93c2302e6 to your computer and use it in GitHub Desktop.
Javascript that removes extra Linkedin posts from feed other then reposts. Requires the Tampermonkey extension.
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 RemoveLinkedinExtra | |
// @author ioi | |
// @match https://www.linkedin.com/feed/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=linkedin.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.setInterval(function(){ | |
let statuses = document.querySelectorAll(".feed-shared-update-v2"); | |
statuses.forEach(function (status) { | |
let topbar = status.querySelector(".update-components-header"); | |
if(topbar) { | |
let relevant = topbar.innerHTML.includes("posted this"); | |
if(!relevant) { | |
status.remove(); | |
} | |
} | |
}); | |
},1000); | |
// Your code here... | |
})(); | |
/* | |
BONUS: CSS that removes the notification badge from the home tab. | |
.global-nav__primary-link-notif .notification-badge { | |
display: none!important; | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment