You are here

function shurly_block_content_bookmarklet in ShURLy 7

Generate Shurly bookmarklet for respective block

1 call to shurly_block_content_bookmarklet()
shurly_block_view in ./shurly.module
Implements hook_block_view().

File

./shurly.module, line 181
description http://www.youtube.com/watch?v=Qo7qoonzTCE

Code

function shurly_block_content_bookmarklet() {
  shurly_css_js('css');
  return t("<p>Drag this link to your bookmark bar to quickly create a short URL from any page: <a class=\"shurly-bookmarklet\" href=\"!jsurl\">!sitename</a></p>", array(
    '!jsurl' => "javascript:void(location.href='" . _surl('shurly', array(
      'absolute' => TRUE,
    )) . "?url='+encodeURIComponent(location.href))",
    '!sitename' => variable_get('site_name', 'Drupal'),
  ));
}