Greasy Fork

Outlook 365 change colour of mouse-hover email and selected email

Changes the colour of the email that your mouse cursor is hovering over, as well as the colour of a selected email

当前为 2024-01-27 提交的版本,查看 最新版本

// ==UserScript==
// @name        Outlook 365 change colour of mouse-hover email and selected email
// @namespace   english
// @description Changes the colour of the email that your mouse cursor is hovering over, as well as the colour of a selected email
// @include     http*://*outlook.office.com/mail*
// @include     http*://*outlook.office365.com*
// @version     1.9
// @run-at      document-end
// @grant       GM_addStyle
// ==/UserScript==

var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = `
    /* Targeting the email item on hover */
    .xc0ZS.JtO0E:hover {
        background-color: #11528a !important;
    }
    /* Targeting the selected email item */
    div.hcptT[aria-selected="true"] .xc0ZS.JtO0E {
        background-color: #11528a !important;
    }
    #loadingScreen {
        background-color: #2b2b2b;
    }
    /* Additional styles for text elements inside the email item */
    .xc0ZS.JtO0E:hover .gy2aJ.U2XB8,
    .xc0ZS.JtO0E:hover .FqgPc.gy2aJ.U2XB8,
    div.hcptT[aria-selected="true"] .xc0ZS.JtO0E .gy2aJ.U2XB8,
    div.hcptT[aria-selected="true"] .xc0ZS.JtO0E .FqgPc.gy2aJ.U2XB8 {
        color: #fff !important;
    }
    /* Targeting the time display */
    .xc0ZS.JtO0E:hover ._rWRU.U2XB8.qq2gS.D8iyG,
    div.hcptT[aria-selected="true"] .xc0ZS.JtO0E ._rWRU.U2XB8.qq2gS.D8iyG {
        color: #fff !important;
    }
    .xc0ZS.JtO0E:hover .W3BHj.gy2aJ.Dc0o9.U2XB8,
    .xc0ZS.JtO0E:hover .IjzWp.xc0ZS.gy2aJ.U2XB8,
    div.hcptT[aria-selected="true"] .xc0ZS.JtO0E .W3BHj.gy2aJ.Dc0o9.U2XB8,
    div.hcptT[aria-selected="true"] .xc0ZS.JtO0E .IjzWp.xc0ZS.gy2aJ.U2XB8 {
        color: #54d0ec !important;
    }
    /* Targeting the calendar occurrence text */
    div.PHmmX.lm1q3.sqQsa.ivPEU .bUGtK {
        color: #fff !important;
    }
`;
document.getElementsByTagName('head')[0].appendChild(style);