Just to add to the other answers, there is one stable orbit that a planet can have, in between two binary stars like this and spending equal amounts of time close to both stars. But it's not a figure of eight. It's a corkscrew orbit. The planet spirals around the line joining the two stars, and in that spiral it moves from one star to the other and then back again.
The authors of the paper on this topic also worked out that if the alignment is right we might be able to observe planets on these corkscrew orbits photometrically.