diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-08-17 22:54:54 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-08-17 22:54:54 -0400 |
commit | 30fcd3949cd8bc74be9debd6fe8c53015dc06798 (patch) | |
tree | 5f4aefbdb6218ceffd133e0945829930b1ed99dd /templates/subscribelet.php | |
parent | 9d56198d1aac420287bf52400bb4d7160566463d (diff) |
bookmarkelet working now
Diffstat (limited to 'templates/subscribelet.php')
-rw-r--r-- | templates/subscribelet.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/subscribelet.php b/templates/subscribelet.php new file mode 100644 index 000000000..4db1c55e7 --- /dev/null +++ b/templates/subscribelet.php @@ -0,0 +1,8 @@ +<?php + +function createSubscribelet() { + $l = OC_L10N::get('news'); + echo '<small>' . $l->t('Drag this to your browser bookmarks and click on it whenever you want to subscribe to a webpage quickly:') . '</small>' + . '<a class="button bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OCP\Util::linkToAbsolute('news', 'subscribe.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=150px,width=360px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">' + . $l->t('Subscribe') . '</a>'; +} |