If I have the flying focus chrome plugin installed and I visit a site that uses the flying focus script, 2 instances of flying focus run on the same page. This creates 2 separate elements (both with the id flying-focus) and they are both animated.
The fact that this happens doesn't actually break anything (they just overlap), and it's not really a performance concern since it's such a light plugin. Rather, it simply feels wrong to have 2 of them running at the same time, especially since both of the elements created have the same id.
So, flying-focus should check if the #flying-focus element has already been created, and exit if it has, to prevent multiple instances.
If I have the flying focus chrome plugin installed and I visit a site that uses the flying focus script, 2 instances of flying focus run on the same page. This creates 2 separate elements (both with the id
flying-focus) and they are both animated.The fact that this happens doesn't actually break anything (they just overlap), and it's not really a performance concern since it's such a light plugin. Rather, it simply feels wrong to have 2 of them running at the same time, especially since both of the elements created have the same id.
So, flying-focus should check if the
#flying-focuselement has already been created, and exit if it has, to prevent multiple instances.