[Greasemonkey] Skype's mime type not found in a greasemonkey script
Olivier Vernin
overnin at gmail.com
Mon Oct 9 07:09:50 PDT 2006
Hi,
In my Greasemonkey script, I need to detect if Skype is installed on the
current computer.
I try to do it as skype does it for firefox in the
http://download.skype.com/share/skypebuttons/js/skypeCheck.js javascript.
In this skypeCheck.js, they use the following code:
...
var skypeMime = navigator.mimeTypes["application/x-skype"];
detected = true;
if(typeof(skypeMime) == "object") {
return true;
} else {
return oopsPopup(); //open a popup to invite the user to
install skype
}
...
The problem is that when I call the 'navigator.mimeTypes
["application/x-skype"]' function in my greasemonkey script, It returns
'undefined' even if skype is installed on my computer. I've listed the
application mime types in a Greasemonkey script, there is a lot of
applications but no 'x-skype' at all. I've also tried to call the function
with the unsafeWindow object ( 'unsafeWindow.navigator.mimeTypes
["application/x-skype"]') but it the same list: no 'x-skype'.
I've check the running of the skypeCheck.js file on a regular page (
http://share.skype.com/sites/fr/) with the Venkman's plugin. It works: the
function 'navigator.mimeTypes["application/x-skype"]' return an object.
Is anybody experienced with such problem?
Best Regards,
Olivier Vernin
More information about the Greasemonkey
mailing list