One.com webmail width fix

Fixes the stupid width issue of the first sidebar.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         One.com webmail width fix
// @namespace    http://tampermonkey.net/
// @version      2024-12-11
// @description  Fixes the stupid width issue of the first sidebar.
// @author       BramDriesen
// @match        https://mail.one.com/mail/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=one.com
// @grant        none
// @license      GNU GPLv3
// ==/UserScript==

(function() {
    'use strict';

    setTimeout(function (){
        // Enlarge the left sidebar.
        document.querySelector("#leftContainer").setAttribute("style", "width: 320px; max-width: 320px");
        document.querySelector("#leftContainer > div.panel1").setAttribute("style", "inset: 0px auto 0px 0px; max-width: 600px;");

        // Update all list labels.
        const elements = document.querySelectorAll(".folderList-label");
        elements.forEach(element => {
            element.setAttribute("style", "max-width: fit-content !important");
        });
    }, 1000);
})();