Skip to content

Instantly share code, notes, and snippets.

@allannnnf allannnnf/unu
Created Aug 11, 2009

What would you like to do?
names: ["unu", "u"],
arguments: noun_type_url,
icon: "",
description: "Enter your big bad URL and will cut it down to size.",
author: {name:"Allan Freitas", email:""},
preview: function(pblock, {object: {text}}){
if (!text) {
pblock.innerHTML = this.description;
var me = this;
pblock.innerHTML = _("Big bad URL is now... ");
CmdUtils.previewGet(pblock, this._api(text), function(uNu) {
if(uNu !== "Error")
pblock.innerHTML = _("Replaces the selected URL with <b>${u}</b>.",
execute: function(args) {
var me = this;
jQuery.get(this._api(args.object.text), function(uNu) {
CmdUtils.setSelection(me._link(uNu), {text: uNu});
Utils.clipboard.text = uNu;
_api: function(url)("" +
_link: function(url) {
var eu = Utils.escapeHtml(url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.