Skip to content

Instantly share code, notes, and snippets.

@eversonl
Created February 18, 2009 19:11
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 eversonl/66483 to your computer and use it in GitHub Desktop.
Save eversonl/66483 to your computer and use it in GitHub Desktop.
posterous.com bookmarklet
//posterous
CmdUtils.CreateCommand({
name: "posterous",
icon: "http://posterous.com/images/favicon.png",
homepage: "http://www.0-21.co.uk/index.php/200902173422/Blog/Lee-s-Blog/My-Ubiquity-commands.html",
author: { name: "Lee Everson", email: "lee@0-21.co.uk"},
license: "GPL",
description: "Select text, video, music or photos from any web page and post it instantly to your posterous, just by clicking a special bookmark",
// help: "",
preview: function(pblock) {
pblock.innerHTML = "unleash the The Posterous Bookmarklet.";
},
execute: function() {
var bookmarkletCode = "javascript:var%20b=document.body;var%20POSTEROUS___bookmarklet_domain='http://posterous.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.type='text/javascript');void(z.src='http://posterous.com/javascripts/bookmarklet2.js');void(b.appendChild(z));}else{}";
var urlBar = context.chromeWindow.document.getElementById("urlbar");
var oldURL = urlBar.value;
urlBar.value = bookmarkletCode;
context.chromeWindow.handleURLBarCommand();
urlBar.value = oldURL;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment