Skip to content

Instantly share code, notes, and snippets.

@marcosvpj
Last active October 19, 2023 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcosvpj/9c495b249b9b895c3a5f0952b1867ace to your computer and use it in GitHub Desktop.
Save marcosvpj/9c495b249b9b895c3a5f0952b1867ace to your computer and use it in GitHub Desktop.
Userscript to hide non-essential elements to focus on day events
// ==UserScript==
// @name Remove non-essential elements on https://outlook.office.com/calendar/view/workweek
// @namespace Violentmonkey Scripts
// @match https://outlook.office.com/calendar/view/*
// @grant GM_addStyle
// @version 1.1
// @author marcosvpj
// @description 10/11/2023, 9:22:35 AM
// ==/UserScript==
(function() {
'use strict';
var displayNone =
"/* Remove headers */"+
"/******************************************************/ "+
"#o365header { display:none; } "+
"#mainApp > div:nth-of-type(2) > div:first-of-type { display:none; } "+
""+
"";
function main(){
console.log("==============================================================");
console.log("RUNNING cleaning script");
console.log("==============================================================");
GM_addStyle(displayNone);
// Scroll to current time
document.querySelectorAll('#id__72 .s63tW')[0].scrollIntoView({
behavior: 'auto',
block: 'center',
inline: 'center'
});
}
main();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment