New Outlook.com Email OWA Adbar remover

This script removes Outlook.com Email OWA Ads from new interface and reclaims the space.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         New Outlook.com Email OWA Adbar remover
// @version      0.1.4
// @description  This script removes Outlook.com Email OWA Ads from new interface and reclaims the space.
// @author       Allan DSouza
// @match        https://outlook.live.com/*
// @grant        none
// @namespace https://greasyfork.org/users/20177
// ==/UserScript==


(function() {var css = [
    "._n_h {display: none; width: 0 !important; position: absolute}",
    "#primaryContainer > div:nth-child(7){ right: 0 !important; width: 100% !important;}",
    "._n_15 {display: none; width: 0 !important; position: absolute}",
    "._2qPmszDwBfYpF7PO9Mn3KN {display: none; width: 0 !important; position: absolute}"
].join("\n");

	var node = document.createElement("style");
	node.type = "text/css";
	node.appendChild(document.createTextNode(css));
	var heads = document.getElementsByTagName("head");
	if (heads.length > 0) {
		heads[0].appendChild(node); 
	} else {
		document.documentElement.appendChild(node);
	}
})();