Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/valvim/chromed_bird into …
Browse files Browse the repository at this point in the history
…valvim-master
  • Loading branch information
cezarsa committed Feb 10, 2011
2 parents 046d84f + 0fc0b17 commit 9ee299c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/shortener_lib.js
Expand Up @@ -402,6 +402,27 @@ MinifyShortener = {
}
};

VaMuShortener = {
shorten: function(longUrl, useAcct, login, apiKey, serviceUrl, callback) {
var url = "http://va.mu/api/create/";
var params = {
url: longUrl
};
$.ajax({
type: 'GET',
url: url,
data: params,
dataType: 'text',
success: function(data, status) {
callback(0, data);
},
error: function (request, status, error) {
callback(-1, chrome.i18n.getMessage("ajaxFailed"));
}
});
}
};

SHORTENERS_BACKEND = {
bitly: {
desc: 'bit.ly',
Expand Down Expand Up @@ -467,5 +488,9 @@ SHORTENERS_BACKEND = {
minify: {
desc: 'minify',
backend: MinifyShortener
},
vamu: {
desc: 'va.mu',
backend: VaMuShortener
}
};

0 comments on commit 9ee299c

Please sign in to comment.