aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/scripts/media.js
diff options
context:
space:
mode:
authorMichal Rezler <rezlemic@fel.cvut.cz>2011-03-27 13:57:35 +0200
committerMichal Rezler <rezlemic@fel.cvut.cz>2011-03-27 13:57:35 +0200
commit11bf24d856a6a4cb606bc6fe10ebcbd844f4127f (patch)
treef5254cfa12a72b660f2907660b0d2317f73795fa /lib/scripts/media.js
parentfdfb9c6a2877dcbadeab697aad779bea76780965 (diff)
downloaddokuwiki-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.js22
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