Hide outlook google ad

hide outlook google ad

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name               Hide outlook google ad
// @name:zh-CN         隐藏outlook右侧google广告
// @namespace          vince.outlook
// @version            1.1
// @description        hide outlook google ad
// @description:zh-CN  隐藏outlook右侧显示的广告
// @author             vince ding
// @match              https://outlook.live.com/*
// ==/UserScript==

function closeAd(){
    var css = '._n_h,#app > div >div:last-child>div>div>div:last-child { display: none!important; }\r\n#primaryContainer>div:last-child{width:100%!important;}',
        head = document.head || document.getElementsByTagName('head')[0],
        style = document.createElement('style');

    style.type = 'text/css';
    if (style.styleSheet){
        style.styleSheet.cssText = css;
    } else {
        style.appendChild(document.createTextNode(css));
    }

    head.appendChild(style);
}

closeAd();