]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'firefox-sub-link' into 'master'
authormmn <mmn@hethane.se>
Mon, 14 Dec 2015 21:08:22 +0000 (21:08 +0000)
committermmn <mmn@hethane.se>
Mon, 14 Dec 2015 21:08:22 +0000 (21:08 +0000)
Link to add to Firefox as feedreader

This allows easily subscribing to any feed firefox detects in your GNU Social instance.

See merge request !55

plugins/OStatus/OStatusPlugin.php

index 7db385b1a9a94e8b439532955e4fcb4c9665a512..c3307f23cbcb021dec2378f4391a146ba59cbca5 100644 (file)
@@ -444,6 +444,17 @@ class OStatusPlugin extends Plugin
         return null;
     }
 
+    function onEndProfileSettingsActions($out) {
+        $siteName = common_config('site', 'name');
+        $js = 'navigator.registerContentHandler("application/vnd.mozilla.maybe.feed", "'.addslashes(common_local_url('ostatussub', null, array('profile' => '%s'))).'", "'.addslashes($siteName).'")';
+        $out->elementStart('li');
+        $out->element('a',
+                      array('href' => 'javascript:'.$js),
+                      // TRANS: Option in profile settings to add this instance to Firefox as a feedreader
+                      _('Add to Firefox as feedreader'));
+        $out->elementEnd('li');
+    }
+
     /**
      * Make sure necessary tables are filled out.
      */