<h1>
<a href="javascript:(function(){%20window.open('http://bit.ly/?url='+encodeURIComponent(location.href));%20})();" rel="nofollow" class="pagetitleinfo textcontrol" >{vb:rawphrase vbshorten}</a>
Screenshots
1.png (23.4 KB, 0 views) 2.png (62.1 KB, 0 views) 5.jpg (29.9 KB, 0 views)
Supporters / CoAuthors
Show Your Support
<script type="text/javascript"> function makeShort() { var longUrl=document.getElementById("longurl").value; var request = gapi.client.urlshortener.url.insert({ 'resource': { 'longUrl': longUrl } }); request.execute(function(response) { if(response.id != null) { str ="<b>Long URL:</b>"+longUrl+"<br>"; str +="<b>Short URL:</b> <a href='"+response.id+"'>"+response.id+"</a><br>"; document.getElementById("output").innerHTML = str; } else { alert("error: creating short url \n"+ response.error); } }); } function getShortInfo() { var shortUrl=document.getElementById("shorturl").value; var request = gapi.client.urlshortener.url.get({ 'shortUrl': shortUrl, 'projection':'FULL' }); request.execute(function(response) { if(response.longUrl!= null) { str ="<b>Long URL:</b>"+response.longUrl+"<br>"; str +="<b>Create On:</b>"+response.created+"<br>"; str +="<b>Short URL Clicks:</b>"+response.analytics.allTime.shortUrlClicks+"<br>"; str +="<b>Long URL Clicks:</b>"+response.analytics.allTime.longUrlClicks+"<br>"; document.getElementById("output").innerHTML = str; } else { alert("error: "+response.error); } }); } function load() { //Get your own Browser API Key from https://code.google.com/apis/console/ gapi.client.setApiKey('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'); gapi.client.load('urlshortener', 'v1',function(){document.getElementById("output").innerHTML="";}); } window.onload = load; </script> <script src="https://apis.google.com/js/client.js"></script> URL: <input type="text" id="longurl" name="url" value="{vb:raw thread_url}" /> <br/> <input type="button" value="{vb:rawphrase vbshorten}" onclick="makeShort();" />