1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2024-11-29 04:24:11 +01:00

Added bookmarklet for browser. Inspired by Google Bookmarks

This commit is contained in:
Alessandro Cosentino 2012-02-19 20:18:27 -05:00
parent 8b3262ea20
commit dacffb5a06
3 changed files with 21 additions and 3 deletions

View File

@ -40,6 +40,7 @@ $url = isset($_GET['url']) ? urldecode($_GET['url']) : '';
$metadata = getURLMetadata($url);
$tmpl->assign('URL', htmlentities($metadata['url'],ENT_COMPAT,'utf-8'));
$tmpl->assign('TITLE', htmlentities($metadata['title'],ENT_COMPAT,'utf-8'));
$title = isset($metadata['title']) ? $metadata['title'] : (isset($_GET['title']) ? $_GET['title'] : '');
$tmpl->assign('TITLE', htmlentities($title,ENT_COMPAT,'utf-8'));
$tmpl->printPage();

View File

@ -83,4 +83,17 @@
.loading_meta {
display: none;
margin-left: 5px;
}
}
#footer {
color: #999;
font-size: medium;
text-align: center;
position: absolute;
bottom: 10px;
left: 0px;
width: 100%;
height: 20px;
visibility: visible;
display: block
}

View File

@ -22,4 +22,8 @@
</div>
<div class="bookmarks_list">
<?php echo $l->t('You have no bookmarks'); ?>
</div>
</div>
<div id="footer">
Bookmark pages more easily. Drag this bookmarklet to the Bookmarks bar of your browser:
<a style='background-color:#dddddd;border:1px groove #999; padding:5px;padding-top:0px;padding-bottom:2px; text-decoration:none; margin-top:5px' href='javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("<?php echo OC_Helper::linkToAbsolute('bookmarks', 'addBm.php') ?>?output=popup&url="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=510px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();'>ownCloud bookmark</a>
</div>