diff options
author | Michal Rezler <rezlemic@fel.cvut.cz> | 2011-03-27 13:57:35 +0200 |
---|---|---|
committer | Michal Rezler <rezlemic@fel.cvut.cz> | 2011-03-27 13:57:35 +0200 |
commit | 11bf24d856a6a4cb606bc6fe10ebcbd844f4127f (patch) | |
tree | f5254cfa12a72b660f2907660b0d2317f73795fa /lib/scripts/media.js | |
parent | fdfb9c6a2877dcbadeab697aad779bea76780965 (diff) | |
download | dokuwiki-11bf24d856a6a4cb606bc6fe10ebcbd844f4127f.tar.gz dokuwiki-11bf24d856a6a4cb606bc6fe10ebcbd844f4127f.zip |
helpers.js was removed - it basically contained functions they are implemented in jQuery library
Diffstat (limited to 'lib/scripts/media.js')
-rw-r--r-- | lib/scripts/media.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/scripts/media.js b/lib/scripts/media.js index a9b8b49da..f407aa2f7 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -11,7 +11,7 @@ * @author Pierre Spring <pierre.spring@caillou.ch> */ (function ($) { - var toggle, list, prepare_content, insert, confirmattach, attachoptions, initpopup, updatehide, setalign, setsize, inSet, outSet, media_manager; + var toggle, list, prepare_content, insert, confirmattach, attachoptions, initpopup, updatehide, setalign, setsize, inSet, outSet, media_manager, hasFlash; var media_manager = { keepopen: false, @@ -156,6 +156,26 @@ btn.value = LANG['mediainsert']; btnp.appendChild(btn); }; + + // moved from helpers.js temporarily here + /** + * Very simplistic Flash plugin check, probably works for Flash 8 and higher only + * + */ + hasFlash = function(version){ + var ver = 0; + try{ + if(navigator.plugins != null && navigator.plugins.length > 0){ + ver = navigator.plugins["Shockwave Flash"].description.split(' ')[2].split('.')[0]; + }else{ + var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); + ver = axo.GetVariable("$version").split(' ')[1].split(',')[0]; + } + }catch(e){ } + + if(ver >= version) return true; + return false; + }; /** * Insert the clicked image into the opener's textarea |