How do I disable sIFR when Mac OS is detected?

209 views Asked by At

I use sIFR so text looks good on Windows machines. Since Macs have great text rendering, I want to disable sIFR when a Mac is detected so I have more flexibility animating fades. I'm trying to understand this post on the sIFR wiki, it suggests how this might be done, but the code in the sifr.js is dense and I'm not at all sure where or what to add or remove.

http://wiki.novemberborn.net/sifr/How+to+use

"If you want to enable/disable sIFR for a specific browser, you can use the UA object as described below and you'll have to edit the following code in sifr.js:

if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac){
sIFR.setup();

};

In this example sIFR is disabled for IE/Mac. Remove the && !sIFR.UA.bIsIEMac part to enable it again. You can also add other browsers here."

Can anyone help me implement this? (I assume that the above example is meant to be just a fictional example since IE hasn't run on Macs in ages and ages...)

Thanks for looking!

2

There are 2 answers

0
nomi On

If you're using sIFR 3, you should try something like this instead.

Add following line of code in sifr-config.js before sIFR.activate() command.

 sIFR.ua.supported = sIFR.ua.supported && !sIFR.UA.bIsIEMac;  
 sIFR.activate(yourfont.swf);

I had a similar problem where I had to deactivate sIFR for IE9 and this trick worked for me.

0
nomi On

or try this this

 sIFR.ua.supported = sIFR.ua.supported && (!sIFR.ua.ie || !sIFR.UA.bIsIEMac);
 sIFR.activate(yourfont.swf);