Firefox Ubiquity – Character Count Command

Now that Ubiquity 0.5 is out, Erik’s Character Count Command no longer works. So I have updated it and if you have Ubiquity Firefox, the command bar should have appeared on top for you. Here is the code:

CmdUtils.CreateCommand({
names: ['char-count'],
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'text to count chars in'}],
preview: function( pblock, args ) {
//pblock.innerHTML = argText.object.length;
pblock.innerHTML = "The number of characters is: "+ args.object.text.length;
}
});

Hope you found it useful!

What do you think of this post?
  • Agree (0)
  • Don't Agree but Interesting (0)
  • You're an asshole (0)

8 thoughts on “Firefox Ubiquity – Character Count Command”

  1. Really cool char count tool, it helps me with my work.
    You helped me to explore and learn the new world of Ubiquity

    it crushed my browser when i first tried it but it works fine now

    Thanks

    Reply

  2. @ice machines
    That's odd. Were you trying to count the number of characters in the Twitter Updates? In which case, simply select them without copying, bring up Ubiquity and type the char-count command. No need to paste it – I got 493 characters.

    Nevertheless, I tried pasting and it worked – very strange. I anyone else facing this problem?

    Reply

Leave a Comment