Apr 21

Firefox trunk now has HTML 5 drag and drop code; Time to get clipboard working nicer?

Ajax, Tech with tags: , 4 Comments »

I have already jabbered on about getting the clipboard to work nicely in Bespin and your own Web application.

Johan Sörlin noted the Firefox trunk had an interesting development with new code being checked in for HTML5 drag and drop.

He told me:

I’ve fiddled some with the new drag drop support in FF 3.6 nightly. And I was amazed to find that you can get the plain/text and html/text contents out of the drop event. So in theory this can be used as a method of accessing the clipboard.

However this event doesn’t fire when you paste contents so it can’t be used for now.

But according to the HTML5 spec the drop event should fire when you paste contents.

This is good news because now we have drag and drop support in code, and hopefully soon we will have access to data on paste!

Dec 09

App Discover: An add-on that shows me when apps or user scripts are available for a site

Mozila, Tech, Web Browsing with tags: , 10 Comments »

Greasemonkey and Fluid userscripts. AIR and the new Titanium apps. Browser add-ons. When you go to a website do you know if you are getting the best experience for you? You could search for script on userscripts, or Google for apps, but what if the developers of the sites had a way of pointing out that there were enhanced experiences for you?

This is where App Discover comes in. It is a Firefox add-on that notifies you of these very items. All the developer has to do is add a simple link tag to their page, and the add-on will find it for you.

For example, if Twitter added the following tag, you would be notified of TweetDeck:

<link rel="application" 
  type="application/vnd.adobe.air-application-installer-package+zip" 
  title="TweetDeck Adobe AIR Twitter App" 
  href="http://www.tweetdeck.com/beta/TweetDeck_0_20.air" />

That line would mean you would see this in the browser:

Twitter App Discover Example

The type is a mime-type of course, and these are mapped into custom verbiage, but if you come up with something new… as long as the href is good, you should be golden.

I just added support for Appcelerator Titanium for example:

<link rel="application" 
  type="application/vnd.appcelerator-titanium-app-package+zip" 
  title="Tweetanium Appcelerator Titanium Twitter App" 
  href="http://tweetanium.com/tweetanium.zip" />

This is just a simple beginning of course. Where would we really want to go from here?

  • The current limitation is that it only really works well with one link tag (items get replaced)
  • I want to add preferences so the user can let the add-on know what they want to be alerted about (e.g. yes to Titanium apps and Greasemonkey scripts only!)
  • Be smart based on installation: E.g. if you don’t have Fluid (and especially if not on a Mac), don’t show it
  • Get social: “You have three friends who have installed TweetDeck”. This requires the browser being smarter about your social graph, which I think is a natural progression.
  • It should be smarter and not bug you when you go back to the same page. That can be fixed via the AnnotationService.

That leads me to XUL. I tweeted how it can feel a little strange to look up XUL docs and see dates in the lower 2000s. You have this nagging feeling of “has something really not changed since them? Is there an new better way of doing this?” As @mfinkle pointed out, “XUL is stable.”

I have to say thanks to the Ubiquity team who had done the lifting for me, which meant that this add-on took an hour to write!

May 09

Lifehack: Accessing Safari/WebKit tabs via a key stroke

Tech, Web Browsing with tags: , , 3 Comments »

I love how Firefox lets me hit Apple (or Splat as James Strachan calls it!) plus a number to go to the given tab in the browser window.

I often follow the pattern of “open new link in a tab and go to it at the end” and also have windows open with known apps up in the same tab location so I can get to them quickly, without even thinking. Being able to Splat-9 to go to the end is key to this of course.

Although Firefox does this by default, WebKit/Safari does not, so I changed it via a simple hack that others have mentioned. Some people saw me doing this at JavaOne and asked me how I did it, so I decided to quickly show how it is done in the window below.

The steps to follow are:

  • Generate AppleScripts to tell Safari and WebKit to go to the right tab. This is talked about here, and I have a slightly modified version that I will paste at the end of this post
  • Tie together the AppleScript to the browsers. I tried to use simple keyboard bindings in the keyboard pref panel, but that didn’t work, so I ended up using Quicksilver triggers

See how it all fits together below!

Mar 01

Firefox 3 Proto Interface for Mac

Tech with tags: , , , 4 Comments »

Firefox 3 Proto Interface for Mac

In general I think the new Firefox 3 Mac interface “Proto” is nicer. I keep seeing new versions come along, but they are all wonky for me, and I think it is due to my 1Password icon. The favicon.ico is always in the wrong place (as above).

I do think that that the buttons and elements are too big and roundy. I prefer the simpler Safari layout, and it doesn’t use as much room before the URL bar itself. It seems that people like to go crazy over these interface changes “waaaaah I liked it how it was!” but I am glad that they are playing with things…. and with Aza, I hope we see more ;)

Feb 06

Firefox 3: A reason why it is fast

Tech, Web Browsing with tags: , 6 Comments »

Firefox 3

I have talked a few times about how much I am liking Firefox 3b2 on the Mac. I had given up on Firefox 2, as it was too slow and ate too much memory. Firefox 3 is a different beast. It also barely ever reminds me that it is in beta. It has been very stable indeed; the only issue coming when I am on flaky wireless.

Of course, only a few plugins are working on Firefox 3 (or maybe most work but they don’t update their file / I don’t force update it). This means that I am not loading a bunch of plugin code that slows down Firefox. Thus, I do wonder how it will fare when Firefox 3 is out in full force and so are the plugins.

If FF3 can continue to match Webkit (well, almost) AND give me the plugins I love? Good luck to ‘em.

Dec 20

Firefox Universal Uploader

Tech, Web Browsing with tags: , 1 Comment »

I do a lot of uploading to sites such as YouTube, and the Web interface leaves a lot to be desired for bulk manipulation. Watching the uploading rotating image on YouTube makes me want to scream sometimes (no feedback, unlike Vimeo and FB).

A fellow Googler and all around good guy, Matt Waddell, pointed me to Firefox Universal Uploader, a Firefox add on that supports:

  • Picasa
  • YouTube
  • Flickr
  • Box.net
  • Facebook
  • Webshots
  • OmniDrive
  • SmugMug

Features

  • It shows the local folders and remote folders which enables you to upload files by single click.
  • You can upload any number of files at a time.
  • You can upload files to multiple websites using a single interface (using only one extension).
  • Ability to add multiple accounts and upload files to each account independently.
  • Site specific features are also included and will be improved in the coming versions. eg. Box.net: giving public/private access to files.

Firefox Uploader

Nov 19

Still much room for browser competition

Tech, Web Browsing with tags: , , , , 2 Comments »

I am in a weird hybrid browsing situation at the moment. I have Firefox running as my Firebug client. WebKit nightly gets downloaded every day, and it is my general browser of choice due to its speed. I have also experimented with Opera, and I have to say I am quite impressed there too.

The real shame is that although WebKit is fast, I still prefer the Firefox experience. I would love to see a world that conjoined Firefox the browser with WebKit the renderer and Tamarin/other super duper JavaScript VM for long living apps.

What do I prefer about Firefox as a browser?

  • Tab implementation: I am a keyboard user. That doesn’t mean that I am disabled as Apple seems to claim all over their documentation. The way I navigate tabs is via Apple-NUMBER. I load up windows with tabs with constant order. I know that Apple-1 is my email on “that” kind of window. I also jump to the end for Apple-9. I never iterate through my tabs, as I have to do when I am in WebKit/Safari via Apple-[ / Apple-]. This seems like such a small thing, but I really miss it.
  • Greasemonkey: Using Gmail without Mihai’s scripts is painful. The same goes for the subtle little tweaks that I have made on other sites. I miss not having “my Web”.
  • Del.icio.us: The del.icio.us toolbar add-on is fantastic. Using Safari bookmarks again? Ugh.
  • AdBlock: Nuff said.
  • Misc: There are other tiny random add-ons that I like.

I know that you can get some features via Safari add-ons such as Stand, but I have never found quite the same feel.

Although many are moving to Safari for its speed, it is still lacking in features, so Mozilla has room to maneuver. Apple also seems to really dislike keyboard shortcuts which drives me nuts.

What if Mozilla started a new browser project to do experiments? Zoomable UI, Vertical tabs, and totally rethink the browser as we know it.

Nov 06

“Firebug can make Gmail slow”

Tech, Web Browsing with tags: , , , 5 Comments »

Man I love Firebug. How can you do web development without it? Unfortunately it does seem to slow down my general browsing experience now and then. Even when I have it disabled I see Firefox sucking down more memory, and taking longer to open new tabs and the like.

When I went to my Gmail account today I saw:

Gmail Firebug

Which links too Firebug can make Gmail slow:

If you’re using a Mac

Please note that if you’re using a Mac, you’ll continue to experience performance problems unless you disable Firebug for Gmail. To disable Firebug for www.google.com, please follow the steps below:

  1. Click the green or red icon in the bottom right corner of the browser window to open Firebug.
  2. Click the bug icon in the top left corner of Firebug and select ‘Disable Firebug for mail.google.com.’

If disabling Firebug for Gmail doesn’t improve performance results, you may have to entirely disable Firebug.

On Windows and Linux it suggests to turn off XHR logging (Firebug puts in a proxy XHR object to do all of the work). I wish that I could load up an instance of FF with it on, and one with it off…. I need to look into profiles again.