Merge branch 'firefox-sub-link' into 'master'

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
This commit is contained in:
mmn 2015-12-14 21:08:22 +00:00
commit 0e91a38c9c
1 changed files with 11 additions and 0 deletions

View 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.
*/