Skip to content

Instantly share code, notes, and snippets.

@arvizard
Created May 20, 2009 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arvizard/114601 to your computer and use it in GitHub Desktop.
Save arvizard/114601 to your computer and use it in GitHub Desktop.
A Firefox Ubiquity command for sleep.fm. Very basic atm... type "sleep <alarm time>. Eg: sleep 630am or sleep 630pm... More features to come. PS: Ubiquity is a Firefox extension from Mozilla Labs. You would have to install the extension to be able to use
/* Ubiquity command for sleep.fm ...My first script! Thanks to sleep.fm */
CmdUtils.CreateCommand({
name: "sleep",
homepage: "http://www.arvizardanimations.com/",
author: {name: "Aravind Kumar", email: "aravind@arvizardanimations.com"},
license: "GPL",
description: "Create an alarm using Sleep.fm",
help: "Type sleep followed by the time you want the alarm. For eg, to set an alarm at 6:30am, type 'sleep 630am'. To set an alarm at 6:30p.m, type 'sleep 630pm'.",
takes: {"Alarm time": /.*/},
preview: function(pblock, input) {
pblock.innerHTML = "Set alarm at " + input.text + "</b>.";
},
execute: function(input) {
displayMessage("Alarm set at " + input.text);
Utils.openUrlInBrowser("http://www.sleep.fm/" + input.text);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment