mootools / mootools-core

MooTools Core Repository
https://mootools.net
2.65k stars 510 forks source link

Description of Browser.Plugins.Flash simply isn't true #2005

Closed adamnbowen closed 13 years ago

adamnbowen commented 13 years ago

In the docs, it states "Browser.Plugins.Flash - (boolean) - True if Flash is present.", which simply isn't true, as seen on this jsfiddle

So either, we need to change the documentation to say that Browser.Plugins.Flash is an object with some properties that you can use to test if flash is installed (currently, doing something like Browser.Plugins.Flash.version !== 0 works), or we need to fix the functionality, or we need to do both, and add something like Browser.Plugins.Flash.available (=== true or === false)

cpojer commented 13 years ago

You are right. The docs should say that this is actually an object.

You can do if (Browser.Plugins.Flash){ doSomething(); }

Please fix it and send us a pull request :)

arian commented 13 years ago

By fix it's: press fork button on github, find the right markdown file (Docs/Browser/Browser.md) on github, click "edit file" and fix it on github, press the pull request button on github.

Did i mention github is pretty nice?

seanmonstar commented 13 years ago

@arian: too many steps. simply navigate to the file on the mootools repo, click the button "Fork and edit this file."

adamnbowen commented 13 years ago

okay, I'll make the modification to the documentation tomorrow.

cpojer commented 13 years ago

Thanks ;P that was quick.

adamnbowen commented 13 years ago

By "tomorrow", I apparently meant "15 minutes from now". I've made the documentation change.

@cpojer --just as a note, the code you wrote is incorrect --an iPad will still see Browser.Plugins.Flash as truthy, so you must do

if (Browser.Plugins.Flash.version !== 0) {
    alert('Flash is installed');
}
cpojer commented 13 years ago

Way ahead of you.

cpojer commented 13 years ago

Oh yeah, you are right. Flash is dead tho :P

adamnbowen commented 13 years ago

alas, the client still needed SlideShowPro (and therefore Flash)... Should probably just use its xml file from now on and serve that business with javascript.