summaryrefslogtreecommitdiff
path: root/classes/pref
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-09-09 16:05:59 +0400
committerAndrew Dolgov <[email protected]>2012-09-09 16:05:59 +0400
commit8361e724785767d57cd28be7ceaea7ad81fae0a2 (patch)
treebd19895c0778b8f0108cec561cb80fe911512a7d /classes/pref
parentb8386ad3d14dc0518e1289d3987c79c3922dae2a (diff)
implement sharing of arbitrary stuff using bookmarklet and API call, bump API version
Diffstat (limited to 'classes/pref')
-rw-r--r--classes/pref/feeds.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index ef308ee1c..d6bb94ebe 100644
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -1557,7 +1557,7 @@ class Pref_Feeds extends Handler_Protected {
print "</div>"; # pane
}
- print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Subscribing using bookmarklet')."\">";
+ print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Bookmarklets')."\">";
print "<p>" . __("Drag the link below to your browser toolbar, open the feed you're interested in in your browser and click on the link to subscribe to it.") . "</p>";
@@ -1569,6 +1569,12 @@ class Pref_Feeds extends Handler_Protected {
print "<a href=\"$bm_url\" class='bookmarklet'>" . __('Subscribe in Tiny Tiny RSS'). "</a>";
+ print "<p>" . __("Use this bookmarklet to publish arbitrary pages using Tiny Tiny RSS") . "</p>";
+
+ $bm_url = htmlspecialchars("javascript:(function(){var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='".SELF_URL_PATH."/public.php?op=sharepopup',l=d.location,e=encodeURIComponent,g=f+'&title='+((e(s))?e(s):e(document.title))+'&url='+e(l.href);function a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=500,height=200')){l.href=g;}}a();})()");
+
+ print "<a href=\"$bm_url\" class='bookmarklet'>" . __('Share with Tiny Tiny RSS'). "</a>";
+
print "</div>"; #pane
print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Published & shared articles / Generated feeds')."\">";