Fluid Gmail Userscript
This userscript seems to fix the infamous (and highly annoying) empty popup window bug in Fluid Gmail SSBs when clicking on a link out side of google.com.
Can anyone please take a look, make improvements, and post your version to www.pastie.org? Thanks! Bonus points if you can add Dock badge unread count support, dock menu support, or anything interesting with Growl Notifications (like Jesse did for the Google Reader script). Any improvements you make will likely be included in the release. I’ll certainly add your name to the credits in the About box, and praise your 1337 skillz here and on fluidapp.com (whatever that’s worth! :0p).
Note that I’m planning on shipping the next version Fluid with a small collection of Userscripts to totally replace all site-specific functionality currently in Fluid proper. That would include Gmail, Google Reader, Facebook, Yahoo! Mail and Flickr. If anyone wants to tackle these to help get this release out sooner, I’d be thrilled.
Sooo… feedback on the script below?
// ==UserScript==
// @name Gmail
// @namespace http://fluidapp.com
// @description Gmail features for Fluid
// @include http://mail.google.com/*
// @author Todd Ditchendorf
// ==/UserScript==
(function () {
var closeId = null;
var popUpWindow = null;
var oldOpen = window.open;
window.open = function() {
var url = arguments[0];
if (!url) {
clearTimeout(closeId);
closeId = setTimeout(closeWindow, 100);
}
var res = oldOpen.apply(window, arguments);
if (res) {
popUpWindow = res;
}
return res;
};
function closeWindow() {
popUpWindow.close();
}
})();
About this entry
You’re currently reading “Fluid Gmail Userscript,” an entry on Todd Ditchendorf’s Blog.
- Published:
- 03.05.08 / 2am
- Category:
- Uncategorized
9 Comments
Jump to comment form | comments rss [?] | trackback uri [?]