开发者

One-liner JavaScript to detect if flash is installed

开发者 https://www.devze.com 2023-03-28 06:48 出处:网络
I know there are a bunch of posts asking this question, but all of the answers point to either swfobject or the flash detection kit.

I know there are a bunch of posts asking this question, but all of the answers point to either swfobject or the flash detection kit.

Is there a simple one or two liner in JavaScript just to check if Flash is installed or not? I don't want to have to include a whole js library开发者_如何学编程 if there's an simple way to do this.


As a summary of the above comments as requested:

The following SO answer is applicable: How can I detect if Flash is installed and if not, display a hidden div that informs the user?

Especially the comments / discussion of the above question are useful. I only remember that when we have used a Flash check we had combined two checks for some reasons I cannot recall. This was prior the iPad age, nowadays I'd check against the common [x]Pads if these are among the target audience. Maybe you combine the Flash and Browser check, e.g. once you know the browser is SAFARI/iPad you know it is not supporting Flash.

Try to encapsulate the check so you can change / extend it if required (that was useful for us).


http://www.featureblend.com/flash_detect_1-0-4/flash_detect.js

I know you've seen it before; that's because it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消