Outlook Extend Panel

Extend right side panel of Outlook mail

目前為 2017-02-19 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Outlook Extend Panel
// @version     1.09
// @description Extend right side panel of Outlook mail
// @namespace   iFantz7E.OutlookExtendPanel
// @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
// https://greasyfork.org/scripts/9587-outlook-extend-panel

GM_addStyle(
	"   #MainContent { right: 0px !important; } "
	+ " .WithRightRail { right: 0px !important; } "
	+ " #RightRailContainer, ._n_h, div[aria-label='Module switcher'] { display: none !important; } "
	+ " ._rp_v2, ._rp_Y4 { margin-left: 0px !important; } "
	+ " ._rp_g { margin-left: 13px !important; } "
	+ " .treeHeaderContainer .firstHeaderTreeNodeRow { padding-left: 15px !important; } "
	+ " .oep_Right { right: 0px !important; } "
	+ " .ms-bgc-nlr .subfolders .nowrap { margin-left: -30px; } "
	+ " ._n_G4, ._n_H4 { bottom: 0px !important; } "
);

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

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

function ready()
{
	var countNN = 100;
	var tmNN = setInterval(function()
	{
		var eleNN = document.querySelector("._n_N, ._n_O");
		if (eleNN)
		{
			eleNN.parentElement.parentElement.classList.add("oep_Right");
			clearInterval(tmNN);
		}
		if (countNN-- < 0)
		{
			clearInterval(tmNN);
		}
	}, 200);
	
	setTimeout(function()
	{
		var eleBtn = document.querySelector(".landing .headerHero .buttonLargeBlue");
		if (eleBtn)
		{
			if (eleBtn.textContent.trim() === "Sign in")
			{
				// Auto click sign in
				eleBtn.click();
			}
		}
	}, 3000);
}

function load()
{
}

attachOnReady(ready);
attachOnLoad(load);