Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions gemini/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,12 @@ function updateInputWithMemories() {

// Function to show a small popup message near the button
function showButtonPopup(button, message) {
// Hide the hover pop-up so it doesn't interfere
const hoverPopover = document.querySelector('.mem0-button-popover');
if (hoverPopover) {
hoverPopover.style.display = 'none';
}

// Remove any existing popups
const existingPopup = document.querySelector('.mem0-button-popup');
if (existingPopup) {
Expand All @@ -872,7 +878,7 @@ function showButtonPopup(button, message) {
border-radius: 6px;
font-size: 12px;
white-space: nowrap;
z-index: 10001;
z-index: 10002; /* Higher z-index */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
font-family: 'Google Sans', Roboto, sans-serif;
`;
Expand All @@ -895,15 +901,25 @@ function showButtonPopup(button, message) {

popup.appendChild(arrow);

// Position relative to button
button.style.position = 'relative';
button.appendChild(popup);
// Position relative to button's parent container for better stability
const buttonContainer = button.parentElement;
if (buttonContainer) {
buttonContainer.style.position = 'relative';
buttonContainer.appendChild(popup);
} else {
// Fallback if container is not found
button.style.position = 'relative';
button.appendChild(popup);
}

// Auto-remove after 3 seconds
// Auto-remove after 3 seconds and restore hover pop-up
setTimeout(() => {
if (popup && popup.parentElement) {
popup.remove();
}
if (hoverPopover) {
hoverPopover.style.display = 'block';
}
}, 3000);
}

Expand Down