subscribe by url callback and subtome support

This commit is contained in:
Athou
2013-05-19 10:03:26 +02:00
parent f59198e018
commit d8277800bd
6 changed files with 48 additions and 3 deletions

View File

@@ -934,4 +934,15 @@ function($scope, $location, $state, AdminSettingsService) {
$scope.toUsers = function() {
$state.transitionTo('admin.userlist');
};
}]);
}]);
module.controller('FooterController', [ '$scope', '$location', '$state',
'AdminSettingsService',
function($scope, $location, $state, AdminSettingsService) {
var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf('#'));
var hostname = window.location.hostname;
$scope.subToMeUrl = baseUrl + 'rest/feed/subscribe?url={feed}';
$scope.subToMeName = hostname.indexOf('www.commafeed.com') !== -1 ? 'CommaFeed' : 'CommaFeed (' + hostname + ')';
} ]);