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
| // Set up a mutation observer to watch for url change to detect navigation | |
| var previousUrl = location.href; | |
| var observer = new MutationObserver(function(mutations) { | |
| // If URL changes... | |
| if (location.href !== previousUrl) { | |
| previousUrl = location.href; | |
| // Close popup | |
| removeBanner(); | |