Skip to content

Instantly share code, notes, and snippets.

@No-Eul
Last active July 16, 2025 14:47
Show Gist options
  • Save No-Eul/502f0941e7bfca4881cc12a7303b6d2a to your computer and use it in GitHub Desktop.
Save No-Eul/502f0941e7bfca4881cc12a7303b6d2a to your computer and use it in GitHub Desktop.
Set to disable reply ping to default
// If you want to see an explanation of the code, please refer to the previous revisions
(this.disablePingToDefault = () => {
this.disablePingToDefault.interval = setInterval(() => {
if (location.href !== this.disablePingToDefault.currentUrl) {
if (this.disablePingToDefault.observer !== undefined)
this.disablePingToDefault.observer.disconnect();
else {
this.disablePingToDefault.observer = new MutationObserver(() =>
document.querySelector('div[class*="mentionButton"]')?.click()
);
}
let channelTextArea = document.querySelector('div[class*="channelTextArea"]');
if (channelTextArea !== null)
this.disablePingToDefault.observer.observe(channelTextArea, { childList: true });
this.disablePingToDefault.currentUrl = location.href;
}
}, 50);
})();
// This function changes to original setting; If you want to change it that way, you can run 'enablePingToDefault();' into the console.
this.enablePingToDefault = () => {
clearInterval(this.disablePingToDefault.interval);
this.disablePingToDefault.observer.disconnect();
delete this.disablePingToDefault;
delete this.enablePingToDefault;
};
@No-Eul
Copy link
Author

No-Eul commented Jan 4, 2021

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

Before applying this userscript, It's recommended you should read this gist. The gist includes how to apply the userscript and what to do before applying.

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

유저스크립트를 적용하기 전에 본 Gist를 읽어보는 것이 좋습니다. 여기에는 유저스크립트를 적용하는 방법과 적용하기 전 사전 작업에 대한 내용이 포함되어 있습니다.

@williameom5678
Copy link

이제 이것을 BetterDiscord 플러그인으로 개조해 보겠습니다?

@DYeonsi
Copy link

DYeonsi commented Jul 16, 2025

아이디어가 참 좋으시네요 선생님

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