Archive

JavaScript function to help with Accesskeys

Posted on Wed 21 Dec, 2005

There’s a few little touches I like on sites I frequent: sensible tabindexes for forms, accesskeys and so on. Once I learn the accesskeys, I can fly around the main sections of a site. I apply these things to the sites I build, and the other day I realised adding accesskeys and supporting markup was no fun at all.

I wrote this JavaScript function to search for all your accesskeys and add some friendly markup. It even detects if the user is running Windows or Mac OS, to tell them to use ‘alt’ or ‘ctrl’:

function underline_accesskeys()
{
var links = document.getElementsByTagNam…

Continue reading → | Tagsjavascript, code, snippets, programming

Google Home API Security

Posted on Fri 16 Dec, 2005

If you wanted to develop a Google Home module that accesses a service using a password, you might notice a few flaws:

There isn’t a password type available, so any user preferences that require a password will display the password in plain text.
If you still want to store passwords in user preferences, be aware that every single time Google Home loads, it will fetch the module with the password in plain text in the GET request.

It would be nice if Google introduced a ‘password’ type, to compliment the existing types for preferences. This would at least allow you to have a starre…

Continue reading → | Tagsgoogle, api, programming

Google Home Module

Posted on Thu 15 Dec, 2005

It didn’t take me long, and I knew I wouldn’t be able to go for a few hours without writing a basic plugin for Google Home.

I always wanted to have a del.icio.us search box in a panel with my latest bookmarks, so I wrote this:

Once you’ve added it to your homepage, you can enter your delicious username, and it displays your latest links using raw JSON:

_IG_FetchContent('http://del.icio.us/feeds/json/' + prefs.getString('username') + '?raw', function (responseText) 
{
  posts = eval('(' + responseText + ')')
  for (var i=0, post; post = posts[i]; i++...
Continue reading → | Tagsgoogle, programming, api

script.aculo.us: When to use Ajax and effects

Posted on Sat 10 Dec, 2005

A few applications I’ve been developing recently have either had things from script.aculo.us applied for fun, to add effects our client would like, or they’ve been designed with Ajax and visual effects from the start.

A very beta application I’m working on is Multitap.net. Since it’s my project, and I don’t have clients to answer to, I’ve done whatever the hell I want with it. I had these things in mind when creating it:

  1. I’d use Ajax to allow users to post comments on things, to cut down on page loads. The site features screenshots from videogames as the main content, so I didn’t…
Continue reading → | Tagstips, programming, code, javascript

Carson Workshops: Get Started Using Ajax By Thomas Fuchs

Posted on Fri 9 Dec, 2005

I went to the Get Started Using Ajax workshop with Thomas Fuchs in London yesterday, and despite having used minimal Ajax and script.aculo.us effects before, learned quite a lot.

Thomas started off discussing the background of the technology, and wasn’t scared to dive into real examples, with PHP and Rails. He explained how the Ajax call works, and also discussed the pros and cons of using JavaScript libraries, such as Dojo and script.aculo.us, against using more lean server-oriented abstractions such as Sajax.

What was very interesting was his section on real world examples. The pr…

Continue reading → | Tagsjavascript, programming, workshops