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 + ')';
} ]);

View File

@@ -0,0 +1,3 @@
<div ng-controller="FooterController">
<iframe ui-if="subToMeUrl" style="display:none;" src='https://www.subtome.com/register.html?name={{subToMeName}}&url={{subToMeUrl}}'></iframe>
</div>

View File

@@ -22,10 +22,13 @@
<h3>${about.goodies}</h3>
<p>
<a href="https://chrome.google.com/webstore/detail/commafeed/bpbfpjiciblcfeganojjkfapnllbhdga" target="_blank">Chrome extension</a>
${about.goodies.subscribe_url}: <a href="rest/feed/subscribe?url=FEED_URL_HERE" target="_blank">rest/feed/subscribe?url=FEED_URL_HERE</a>
</p>
<p>
<a href="https://addons.mozilla.org/en-US/firefox/addon/commafeed/" target="_blank">Firefox extension</a>
<a href="https://chrome.google.com/webstore/detail/commafeed/bpbfpjiciblcfeganojjkfapnllbhdga" target="_blank">${about.goodies.chrome_extension}</a>
</p>
<p>
<a href="https://addons.mozilla.org/en-US/firefox/addon/commafeed/" target="_blank">${about.goodies.firefox_extension}</a>
</p>
<h3>${about.translation}</h3>

View File

@@ -13,4 +13,5 @@
</div>
</div>
</div>
<div ng-include="'templates/_footer.html'"></div>
</div>