academo / Workplace NBS

// ==UserScript==
// @name         Workplace NBS
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Small improvements for workplace "new" interface
// @author       Esteban Beltran
// @match        https://booking.facebook.com/*
// @license MIT
// @grant        GM_addStyle
// ==/UserScript==

let scale;
try {
  const contentWidth = document.getElementById("content").getBoundingClientRect().width
  const contentAreaWidth = document.getElementById("contentArea").getBoundingClientRect().width
  scale = (contentWidth / contentAreaWidth) * 0.7;
}
catch (e) {
  scale = 1.5;
}

const cssStyle = `
ul[role="tablist"] {
    width: 60px;
}
ul[role="tablist"] li[role="tab"] {
    word-wrap: anywhere;
}
ul[role="tablist"] li[role="tab"] span {
    font-size: 10px;
    word-wrap: anywhere;
}
.uiScrollableAreaContent > div:nth-child(3) {
    display: none;
}
#contentArea {
    transform: scale(${scale});
    transform-origin: top;
}
`;
GM_addStyle(cssStyle);