-
-
Save 13xforever/28631 to your computer and use it in GitHub Desktop.
QR-Code generator ubiquity commnd
This file contains hidden or 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
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