Add A Button To Switch Firefox Click To Play On Or Off
[Advanced users: if you already know all about the feature, skip down to the ‘Click To Play Switch’ section below]. Click To Play stops plugins (including those most targeted by malware such as Flash Player and Java) from loading automatically when you visit a website that wants to make use of that plugin.
Instead of automatically playing the content (e.g. a Youtube video), the plugin requires you to activate it first e.g. in place of the video a button is displayed – you must click the button to allow the page to make use of the plugin and play the content. This has 2 main benefits:
- Security – plugins shouldn’t be allowed to run without user interaction. Out of date plugins are the most common source of user compromise by malware/hackers.
- Performance – plugins can consume significant resources i.e. slow down page loading. Better control over when and how plugins run can significantly reduce CPU utilization.
Activating Click To Play – normally, you would have to make a change in about:config – changing the value of “plugins.click_to_play” from ‘false’ (disabled) to ‘true’ (Enabled) as shown in our guide [on Firefox 14 – Activating Click To Play section]
However, once activated, you may find that it breaks the functionality of certain sites, even if you whitelist the site. Instead of going back into about:config, it would be much quicker if you could just press a button to disable it temporarily – and without building up huge whitelists.
If you have been put off using this feature because it takes too long to switch it on/off via about:config, read on for a solution.

Example of click to play
Click To Play Switch
This is a simple extension that adds a button to the Firefox Navigation Bar – clicking the button toggles the Click To Play setting On or Off. Download and install from Mozilla Add-Ons here – after restarting you should see the new button:

Click To Play enabled
When you click the button it changes to show that the feature is now disabled (i.e. plugins will ‘play’ automatically):

Click To Play disabled
Optional: when you press the button, it can automatically reload the current tab – useful to apply changes to the open page automatically.
To configure this option – select Firefox Menu\Addons (or Tools\Addons) to open the Extensions tab and press the Options button of the Click To Play Switch extension:
Here you can tick whether to automatically ‘Reload tab on click’ or not.
Extra Security
If you use the button to disable Click To Play, when you restart Firefox the add-on will set the preference to True again (i.e. Click To Play is enabled) – so that you stay protected.
Conclusion
Click To Play is a security and performance feature that has been available since Firefox 14 but is still disabled by default.
The Switch add-on is a great idea that makes it easy and quick to enable or disable the feature at the press of a button – without having to endlessly revisit about:config.