隐藏Outlook网页端的各种内嵌广告
当前为
// ==UserScript==
// @name Hide Outlook ads
// @name:zh-CN 隐藏Outlook广告
// @namespace https://greasyfork.org/zh-CN/users/42351
// @require https://code.jquery.com/jquery-3.2.1.min.js
// @version 0.9
// @description Hide embedded ads in Outlook
// @description:zh-CN 隐藏Outlook网页端的各种内嵌广告
// @author Antecer
// @match https://outlook.live.com/*
// @grant none
// @compatible chrome 测试通过
// @compatible firefox 未测试
// @compatible opera 未测试
// @compatible safari 未测试
// ==/UserScript==
// outlook标准版广告屏蔽css
var cssNomal = [
'._n_h{display: none !important;}', //隐藏右侧广告
'#primaryContainer > div{right: 0px !important; bottom:0 !important;}', //消除上一条广告的占位
'._n_15{display: none !important;}', //隐藏"升级到 Premium"按钮
'._n_05{bottom: 40px !important;}', //消除上一条广告的占位
'div[style*="height: 40px"][style*="bottom: 0px"]{display: none !important;}', //隐藏底部的推荐Edge广告
'div[style*="top: 40px"] > div > div { bottom:0 !important;}', //消除上一条广告的占位
'._lvv_61 > div > div[style] {display: none !important;}' //隐藏收件箱>其他选项卡的内嵌广告
].join("\r\n");
// outlook测试版广告屏蔽css
var cssBeta = [
'._2qPmszDwBfYpF7PO9Mn3KN{display: none !important;}', //隐藏右侧广告
'._20YsfelFmugQWgNkXdkYaF{display: none !important;}', //隐藏订阅outlook广告
'._254GqExCxnOxmPy7kKATP2{display: none !important;}' //隐藏收件箱>其他选项卡的内嵌广告
].join("\r\n");
// 合并css规则
var cssAll = '<style>' + cssNomal + cssBeta + '</style>';
// 执行css规则
jQuery.noConflict();
(function($){ $(function(){
$("head:first").append(cssAll);
});})(jQuery);