Basically the same idea as this question but checking if a bookmark was clicked.
I am creating an inspect element based dev tool that runs through a bookmarklet.
When they click the bookmark the first time, it should initialize and show the inspect pop-up. When they click it a second time, it should hide the pop-up. But when they click it a third time, it should only show the pop-up and not re-initialize. Because it will need to run on any website, it is important that I do not do things like pollute the global scope or the DOM, etc.
Is this possible?