Skip to content

Instantly share code, notes, and snippets.

@13xforever
Last active Aug 29, 2015
Embed
What would you like to do?
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