(tabId)
| 1909 | |
| 1910 | // Function to remove any existing toast |
| 1911 | function removeExistingToast(tabId) { |
| 1912 | chrome.scripting.executeScript({ |
| 1913 | target: { tabId: tabId }, |
| 1914 | func: function() { |
| 1915 | // Remove all possible toast types |
| 1916 | const toastSelectors = [ |
| 1917 | '#neopass-active-toast', |
| 1918 | '#stealth-mode-toast', |
| 1919 | '.neopass-update-toast', |
| 1920 | '[id*="toast"]', |
| 1921 | '[class*="toast"]' |
| 1922 | ]; |
| 1923 | |
| 1924 | toastSelectors.forEach(selector => { |
| 1925 | const existingToasts = document.querySelectorAll(selector); |
| 1926 | existingToasts.forEach(toast => { |
| 1927 | if (toast && toast.parentNode) { |
| 1928 | toast.style.opacity = '0'; |
| 1929 | toast.style.transform = 'translateY(10px) translateX(-50%)'; |
| 1930 | setTimeout(() => { |
| 1931 | if (toast.parentNode) { |
| 1932 | toast.remove(); |
| 1933 | } |
| 1934 | }, 100); |
| 1935 | } |
| 1936 | }); |
| 1937 | }); |
| 1938 | } |
| 1939 | }); |
| 1940 | } |
| 1941 | |
| 1942 | // Function to toggle and store toast opacity level |
| 1943 | async function toggleToastOpacity() { |
no outgoing calls
no test coverage detected