From 720c691fa48d98a2877dbe3623ca763e4473d6fc Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Tue, 11 May 2010 15:28:57 +0200 Subject: [PATCH] update o3.js --- experiments/o3.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/experiments/o3.js b/experiments/o3.js index b63dd408..2941d13d 100644 --- a/experiments/o3.js +++ b/experiments/o3.js @@ -50,8 +50,19 @@ function detect(o) { version = window.external.o3.versionInfo.match(/v([\d]+\.[\d]+)/)[1]; embedded = true; } - else if (navigator.plugins && navigator.plugins[name]) { - version = navigator.plugins[name].description.match(/v([\d]+\.[\d]+)/)[1]; + + else if (navigator.plugins) { + if (navigator.plugins[name]) { + version = navigator.plugins[name].description.match(/v([\d]+\.[\d]+)/)[1]; + } + else { + // try sniffing the mimeTypes + name = "application/" + name; + for (var i = 0, l = navigator.mimeTypes.length; i < l; ++i) { + if (navigator.mimeTypes[i].type == name) + version = "0.9"; + } + } } else { try {