Last active
July 16, 2025 14:47
-
-
Save No-Eul/502f0941e7bfca4881cc12a7303b6d2a to your computer and use it in GitHub Desktop.
Set to disable reply ping to default
This file contains hidden or 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
// 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; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
아이디어가 참 좋으시네요 선생님