Last active
April 8, 2022 09:11
-
-
Save No-Eul/1da87640632342aaa45180de83c7625b to your computer and use it in GitHub Desktop.
Hide Channel Notice in Channel Nav. Bar for Discord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy this code, and paste into the console of your browser or Discord client!
Before Opening DevTools:
How to Open DevTools:
이 코드를 복사해서 당신의 브라우저나 디스코드 콘솔에 붙여넣으세요!
개발자 도구를 열기전에:
개발자 도구 여는 방법: