Reddit auto expand navigation

Expand navigation on the left

// ==UserScript==
// @name         Reddit auto expand navigation
// @version      1.0
// @description  Expand navigation on the left
// @namespace    whatever
// @author       definitelynotspez
// @match        https://www.reddit.com/*
// @license Mit
// @run-at  document-start
// @grant   none
// ==/UserScript==

(function() {
    'use strict';

    // Function to change the expanded attribute
    function changeExpandedValue() {
        const elements = document.querySelectorAll('[expanded="0"]');
        elements.forEach(element => {
            element.setAttribute('expanded', '1');
        });
    }

    // Run the function as soon as the DOM is loaded
    window.addEventListener('DOMContentLoaded', changeExpandedValue);

})();