Last active
February 10, 2024 15:38
-
-
Save iDschepe/bb3b0f40fd249dd3e7e853d98fc81234 to your computer and use it in GitHub Desktop.
Xing Inbox - Remove Ads Messages - Tampermonkey
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 Xing Inbox - Remove Ads Messages | |
// @namespace @idschepe | |
// @version 2024-02-10 | |
// @description try to take over the world! | |
// @author https://github.com/iDschepe | |
// @match https://www.xing.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=xing.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Wait for the page to finish loading | |
window.addEventListener('load', function() { | |
setTimeout(function() { | |
// Select all <li> elements with data-qa attribute equal to "messenger-chat-item-ad" | |
var adItems = document.querySelectorAll('li[data-qa="messenger-chat-item-ad"]'); | |
// Loop through each ad item and remove it | |
adItems.forEach(function(adItem) { | |
adItem.parentNode.removeChild(adItem); | |
}); | |
}, 1000); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment