Replacement script

Hello everyone . . long time . . .
I have a question, a few years back I was looking for a script that detected flash in a browser, if there wasn’t a pluging then JS loaded an image . . was there something like that done since then . .
Thanks in advance
gp