summaryrefslogtreecommitdiffstats
path: root/templates/bookmarklet.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/bookmarklet.php')
-rw-r--r--templates/bookmarklet.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/bookmarklet.php b/templates/bookmarklet.php
new file mode 100644
index 000000000..31a654b86
--- /dev/null
+++ b/templates/bookmarklet.php
@@ -0,0 +1,8 @@
+<?php
+
+function createBookmarklet() {
+ $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('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
+ . $l->t('Subscribe') . '</a>';
+}