ChatGPT Extension
Enhancing ChatGPT with a custom browser extension
Overview
As someone who relies on ChatGPT daily—whether for brainstorming ideas, debugging code, or exploring complex concepts—I've often found myself juggling multiple tabs and tasks. It's easy to forget that I asked a question a few moments ago. Later, I realize I've wasted time waiting without remembering what I was originally trying to solve.
Detecting ChatGPT Response Completion
const observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
if (mutation.target.classList.contains('done-generating')) {
playNotificationSound();
// Additional post-completion logic
}
}
});
observer.observe(document.querySelector('.chat-container'), {
attributes: true,
subtree: true,
childList: true
});