Skip to content

Instantly share code, notes, and snippets.

@eversonl
Created February 18, 2009 13:17
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/66330 to your computer and use it in GitHub Desktop.
Save eversonl/66330 to your computer and use it in GitHub Desktop.
flickr-mdebr embed flickr pics with notes
//flickr-Mbedr
CmdUtils.CreateCommand({
name: "flickr-Mbedr",
icon: "http://www.elsewhere.org/favicon.ico",
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: "This utility will allow you to embed a photo from Flickr on your own site while retaining any annotated regions present on the original. If the photo you want to include on your site doesn't have any annotations notes, as Flickr calls them, then don't bother using this utility.",
help: "Only public photos can be used with this utility at the moment. ",
preview: function(pblock) {
pblock.innerHTML = "Executes the <b>Mbedr</b> bookmarklet<br>however, this can only Mbed public viewable photos, not those set for view by only friends and/or family";
},
execute: function() {
var bookmarkletCode = "javascript:(function(){if(window.page_p)window.open('http://www.elsewhere.org/mbedr/?p='+window.page_p.id);%20else%20alert('No%20Flickr%20photo%20found.');})()";
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