Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jwulf/c5baa7ae11209302615320200d8f82eb to your computer and use it in GitHub Desktop.
Save jwulf/c5baa7ae11209302615320200d8f82eb to your computer and use it in GitHub Desktop.
Remove the Camunda Community Hub Organization prefix from the GitHub Notifications list
// ==UserScript==
// @name Camunda Community Hub - remove moniker in GitHub Notifications
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Remove the 'camunda-community-hub/' organization from the notification title
// @author You
// @match https://github.com/notifications*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
;(function() {
'use strict';
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
if (mutation.addedNodes.length) {
document.querySelectorAll('div.js-notification-sidebar-repositories li a').forEach(aTag => {
Array.from(aTag.childNodes).forEach(node => {
if (node.nodeType === Node.TEXT_NODE) {
node.nodeValue = node.nodeValue.replace(/camunda-community-hub\//g, '');
}
});
});
}
});
});
observer.observe(document.body, { childList: true, subtree: true });
console.log('Executed Greasemonkey script to remove "camunda-community-hub/" from notifications')
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment