Skip to content

Instantly share code, notes, and snippets.

@13xforever
Last active August 29, 2015 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 13xforever/28631 to your computer and use it in GitHub Desktop.
Save 13xforever/28631 to your computer and use it in GitHub Desktop.
QR-Code generator ubiquity commnd
CmdUtils.CreateCommand({
names: ['qr code', 'encode'],
icon: "http://img205.imageshack.us/img205/231/qrcodezh1.gif",
description: "Generates QR Code image based on selected url",
argument: noun_type_url,
preview: function(pBlock, {object}) {
pBlock.innerHTML = '<img src="' + 'http://qrcode.kaywa.com/img.php?s=6&d=' + escape(object.text) + '" />';
},
execute: function(args) {
Utils.openUrlInBrowser('http://qrcode.kaywa.com/img.php?s=8&d=' + escape(args.object.text));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment