Open Firefox and navigate to about:config.
You will be sarcastically warned that you about to void your warranty, just click on the “I’ll be careful, I promise!” button to move on.
Now search for:
plugins.click_to_play
Next you need to right-click and toggle the setting so that the value is true.Once you are done restart Firefox.
To test it out, head over to a site with Flash (BBC, ironically, has Flash), you will notice you will have to click on the plugin to activate it.
That’s all there is to it.
I'm sure there's a similar method for Chrome, but I don't have it installed to test.