How can I make a tab in Firefox falsely believe that it still has the focus?

Since you have not provided details of the website, here is one solution you can try.

  • Install the Greasemonkey extension to allow you to run user JavaScripts on websites of your choice.
  • Install the Always on focus userscript.

    Script Summary: Some pages check the document.hidden property and won't render content unless the page is in focus. This script will trick them to think they are in focus so you can preload them in a tab and visit them when they have finished loading.

  • Configure the script for specific websites, as desired, while installing (or later).

You need to create a User Script. These are javascripts that run within Firefox (or Chrome) and manipulate specific websites.

Tools such as Greasemonkey (http://www.greasespot.net) can be used for this. There may be one already available at http://userscripts.org.

But as @harrymc has already commented, an example URL would be useful.


The Grease/Tamper-monkey answer doesn't work on Facebook watchparties, but manually removing the blur event handlers works in Chrome 75:

Chrome event handler removal

In Firefox the same should be achievable using the Inspector as well:

enter image description here


I'm going to answer the question I think you're meaning to ask.

What you want to do is have Flash run in the background when you've lost focus. This is a big problem with Flash-based idle games, and the following are some bits from Adobe's Flash Administration Manual that should make stuff run when you aren't focused.

mms.cfg file location Assuming a default Windows installation, Flash Player looks for the mms.cfg file in the following system directories:

• 32-bit Windows - %WINDIR%\System32\Macromed\Flash

• 64-bit Windows - %WINDIR%\SysWow64\Macromed\Flash

What you want to do is create this mms.cfg file (you'll need admin access, natch) with the following lines in it:

ProtectedMode=0

FullFramerateWhenInvisible=true

I recall disabling protected mode being necessary, even though its stated purpose is sandboxing Flash apps - for whatever reason, the other option didn't work without it. YMMV, of course - try it without disabling protected mode first - it's been a long while since I've configured this on my computers.

FullFramerateWhenInvisible is the option that makes it so Flash runs when the window doesn't have focus.

Once again, this isn't the specific question you asked, but if it isn't the right answer, it'll at least send you in the right direction. :)

Reference: Admin guide: http://www.adobe.com/devnet/flashplayer/articles/flash_player_admin_guide.html

Framerate trick: http://tukkun.webs.com/ (#3 on that webpage, currently)