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;
};
@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