Greasy Fork

Greasy Fork is available in English.

Outlook Extend Panel

Extend right side panel of Outlook mail

当前为 2016-10-28 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Outlook Extend Panel
// @version     1.04
// @description Extend right side panel of Outlook mail
// @namespace   iFantz7E.OutlookExtendPanel
// @match       *://*.mail.live.com/*
// @match       *://outlook.live.com/*
// @run-at      document-start
// @grant       GM_addStyle
// @icon        https://a.gfx.ms/OLFav.ico
// @copyright	2014, 7-elephant
// ==/UserScript==

// http://userscripts.org/scripts/show/293639
// http://greasyfork.icu/scripts/9587-outlook-extend-panel

GM_addStyle(
	"   #MainContent { right: 0px !important; } "
	+ " .WithRightRail { right: 0px !important; } "
	+ " #RightRailContainer, ._n_h { display: none !important; } "
	+ " ._rp_v2, ._rp_Y4 { margin-left: 0px !important; } "
	+ " ._n_n4 { padding-left: 0px !important; } "
	+ " ._rp_g { margin-left: 14px !important; } "
	+ " .oep_Right { right: 0px !important; } "
);

function attachOnLoad(callback)
{
	window.addEventListener("load", function (e) 
	{
		callback();
	});
}

function attachOnReady(callback) 
{
	document.addEventListener("DOMContentLoaded", function (e) 
	{
		callback();
	});
}

function main()
{
	var countNN = 100;
	var tmNN = setInterval(function()
	{
		var eleNN = document.querySelector("._n_N");
		if (eleNN)
		{
			eleNN.parentElement.parentElement.classList.add("oep_Right");
			clearInterval(tmNN);
		}
		if (countNN-- < 0)
		{
			clearInterval(tmNN);
		}
	}, 100);
	
	var countNO4 = 100;
	var tmNO4 = setInterval(function()
	{
		var elesNO4 = document.querySelectorAll("._n_o4");
		if (elesNO4.length > 0)
		{
			clearInterval(tmNO4);
		}
		
		for (var i = 0; i < elesNO4.length; i++)
		{
			var padLeft = parseInt(elesNO4[i].style.paddingLeft) || 0;
			if (padLeft >= 20)
			{
				elesNO4[i].style.paddingLeft = (padLeft - 20) + "px";
			}
		}
		
		if (countNO4-- < 0)
		{
			clearInterval(tmNO4);
		}
	}, 100);	
}

attachOnReady(main);