(Mel) Gibson Guitars
When I’m browsing, I often double-click to select a word for a clipboard, another search, whatever.
My surprise tonight when I noticed NYT had hijacked my double clicks to open their reference search, which is powered by Answers.com, and is mostly useless and non-contextual.
Which is how I was taught that Gibson only means Mel Gibson.
Guess they need the pageviews.
UPDATE: It actually looks like they are trying to be contextual, as the double click on “Gibson” from this article passes “say, Fender and Gibson” onto Answers.
–jake
CSS Opacity and Flash Transparency in Mac Firefox
I don’t normally paste code up here. I don’t know why. If people find it interesting, maybe I’ll post more.
At the sake of alienating my 4 readers, I wanted to post this so anyone else encountering this ridiculous bug in Mac Firefox regarding CSS opacity with Flash transparency could find some help.
I encountered this bug in the specific case of embedding a transparent Flash SWF (wmode=”transparent”) in a lightbox within an IFRAME. The lightbox code creates a full page div which shades the page, and brings the lightbox into focus.
Calling CSS opacity on this div works for all other browsers, except Mac Firefox. The hack means bypassing CSS opacity in favor of a transparent png used for the shade effect.
Here’s the code.
First, we need to detect Mac Firefox,
function detectMacXFF() {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
return true;
}
}
UPDATE: Joe Aston points out this is fixed in Firefox 3. Here’s a new detect script which will detect the version. Make sure the code below points to detectMacXFF2.
function detectMacXFF2() {
var userAgent = navigator.userAgent.toLowerCase();
if (/firefox[\/\s](\d+\.\d+)/.test(userAgent)) {
var ffversion = new Number(RegExp.$1);
if (ffversion < 3 && userAgent.indexOf('mac') != -1) {
return true;
}
}
}
Then, where your lightbox opacity is set, do this. (note this is not the complete code, but rather what needs to happen). You’ll need a grey (#666) PNG set to 65% opaque in this case.
…
var yourShade = document.getElementById('yourShadeDiv');
var d = detectMacXFF(); //note new detectMacXFF2 script above
if (d) {
//osx ff css opacity + flash wmode transparent doesn't work
yourShade.style.backgroundImage= "url(/path_to/opaque_grey.png)";
yourShade.style.backgroundRepeat="repeat";
} else {
yourShade.style.backgroundColor = "#666";
yourShade.style.MozOpacity = .65;
yourShade.style.opacity = .65;
yourShade.style.filter = "alpha(opacity=65)";
}
…
I hope this helps anyone that stumbles upon it!
–jake







