Remove Discord Bar

N/A

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Remove Discord Bar
// @namespace    http://tampermonkey.net/
// @version      2025-03-25
// @description  N/A
// @author       Integrace
// @match        https://discord.com/channels/*
// @icon         https://i.imgur.com/LX4MpWZ.png
// @grant        none
// @license MIT

// ==/UserScript==

function waitForElement(selector, callback) {
  const interval = setInterval(() => {
    const element = document.querySelector(selector);
    if (element) {
      clearInterval(interval);
      callback(element);
    }
  }, 100);
}


waitForElement('.bar_c38106', (contentArea) => {

  contentArea.style.marginTop = '0px';

  //First remove the contents of the "bar"
  const uselessBar = document.querySelector('.bar_c38106');
  if (uselessBar) {
    uselessBar.style.display = 'none';
    console.log('Success! The useless bar is now hidden.');
  } else {
    console.log('R.I.P. The useless bar element was not found.');
  }

  //Then resize the page
  const baseContainer = document.querySelector('.base_c48ade');
  if (baseContainer) {
    baseContainer.style.gridTemplateRows = 'auto';
    console.log('Success! The layout has been resized.');
  } else {
    console.log('R.I.P. The layout element was not found.');
  }

});