im on firefox 44.0.2 cause its the only latest version that supports older addons. i have an issue & your addon focus regainer never helped & might not be exactly what i'd need, but maybe you could create a script for greasemonkey or another addon for that. i'll explain you the situation:
firefox size tends to grow in vm, & something that is very irritating in the end & that happens since first firefox versions, let's say i have 20 tabs & 4 windows...
After a certain period, one or two other opened windows appear over the window i was working on
-if i click on a link, the click will be re-assigned to the window that came over -if i close my tab or window, it will be the window that came over that will be closed -if i click on the back button on my keyboard, same thing is applied to the window that stole focus.
if a script could avoid that & never allow firefox from bring up other windows from my deskbar when i'm not clicking on them, that would be amazing