< Back to Docs

Examples of the various built in options for lengthening the short urls.

Default Behaviour

  $.longurlplease();
or
  $.longurlplease({lengthenShortUrl: 'smart'});

href Only

  $.longurlplease({lengthenShortUrl: 'href-only'});

Expand fully

  $.longurlplease({lengthenShortUrl: 'full'});

Text and title only

  $.longurlplease({lengthenShortUrl: 'text-and-title'});

Custom Expanding

  function myContrivedCustomExpander(aTag, longurl) {
    aTag.href = longurl;
    if (longurl.length > 30)
      aTag.innerHTML = longurl.substring(0,15) + '...' + longurl.substring(longurl.length-15, longurl.length )
    else
      aTag.innerHTML = longurl;
  }
  $.longurlplease({lengthenShortUrl: myContrivedCustomExpander });