// ==UserScript== // @name Decluttered Outlook // @namespace https://greasyfork.org/users/703184 // @version 1.0.1 // @description Removes all advertisement banners, favorites, groups und the header of folders. // @author floriegl // @grant GM_addStyle // @run-at document-start // @match https://outlook.live.com/mail/* // @downloadURL none // ==/UserScript== (function() { let css = ` /* Right-side ad banner */ div#app > div > div:nth-child(3) > div > div > div > div > div:nth-child(3) { display: none !important; } div#app > div > div:nth-child(3) > div > div:nth-child(2) { display: none !important; } /* Bottom ad banner */ div#app > div > div:nth-child(3) > div > div > div > div:nth-child(2) { display: none !important; } /* "Upgrade" banner */ div#app > div > div:nth-child(3) > div > div > div > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) { display: none !important; } div[role="region"] > div > div > div[role="menubar"] { display: none !important; } div#app > div > div:nth-child(3) > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(2) { display: none !important; } div#app > div > div:nth-child(3) > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(3) > div:nth-child(1) { display: none !important; } div#app > div > div:nth-child(3) > div > div > div > div > div > div:nth-child(2) > div > div > div > div:nth-child(4) { display: none !important; } `; if (typeof GM_addStyle !== "undefined") { GM_addStyle(css); } else { const styleNode = document.createElement("style"); styleNode.appendChild(document.createTextNode(css)); (document.querySelector("head") || document.documentElement).appendChild(styleNode); } })();