Skip to content

Instantly share code, notes, and snippets.

@No-Eul
Last active April 8, 2022 09:11
Show Gist options
  • Save No-Eul/1da87640632342aaa45180de83c7625b to your computer and use it in GitHub Desktop.
Save No-Eul/1da87640632342aaa45180de83c7625b to your computer and use it in GitHub Desktop.
Hide Channel Notice in Channel Nav. Bar for Discord
this.hideChannelNotice = setInterval(() => {
if (this.hideChannelNotice.currentUrl !== location.href) { // Cached url is not equal to location.href, do the following:
let $ = document.querySelector("div[class|=channelNotice]"); // Get channel notice box in channel navigation bar.
if ($ !== null) $.hidden = true; // Hide in display if it's not null.
this.hideChannelNotice.currentUrl = location.href; // Then cache current url.
}
}, 50); // I set 50 millis delay for waiting time. This task will be run every 50 milliseconds.
this.showChannelNotice = () => { // This function changes to original setting; If you wanna change it that way, you can input 'showChannelNotice();' into the console.
clearInterval(this.hideChannelNotice);
[this.hideChannelNotice, this.showChannelNotice] = [undefined];
};
@No-Eul
Copy link
Author

No-Eul commented Apr 23, 2021

Copy this code, and paste into the console of your browser or Discord client!

Before Opening DevTools:

Discord ᅟhas updated to prevent people from opening the console easily in the client. For the reason, you have to do first before you open it:
If you are using Windows, open the file "%APPDATA%\Discord\settings.json" (create it when doesn't exist) and add the key-value pair; It should be seperated each key-value pair by , (comma). Like this:

{
  "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true
}

How to Open DevTools:

In Discord client, press Ctrl, Shift and I
In web browser, press F12

이 코드를 복사해서 당신의 브라우저나 디스코드 콘솔에 붙여넣으세요!

개발자 도구를 열기전에:

디스코드는 사람들이 클라이언트에서 개발자 도구를 쉽게 열지 못하도록 업데이트했습니다. 그래서 개발자 도구를 열기 전에 해야 할 일이 있습니다.
Windows를 사용 중이면 "%APPDATA%\Discord\settings.json" 파일을 열고 (없으면 만들기) 특정 키-값 쌍을 다음과 같이 추가합니다. 이 때, 각각의 키-값 쌍들은 , 로 구분되어야 합니다.

{
  "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true
}

개발자 도구 여는 방법:

디스코드 클라이언트에서 Ctrl Shift I 키 누르기
웹 브라우저에서 F12 키 누르기

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment