Created
February 18, 2009 19:11
-
-
Save eversonl/66483 to your computer and use it in GitHub Desktop.
posterous.com bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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