Skip to content

Commit

Permalink
fixing the demo loading on firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 committed Jun 26, 2013
1 parent 8f5ea1d commit 3856269
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions js/subtome.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(function() {
var subtome = angular.module('subtome', ['i18next', 'angular-google-analytics']);

subtome.config(['$routeProvider', 'AnalyticsProvider', function($routeProvider, AnalyticsProvider) {
Expand Down Expand Up @@ -77,9 +78,7 @@ subtome.controller("IndexController", ['$scope', function IndexController($scope
document.getElementById('demo').innerHTML=i18n.t("See it in Action");
}
$scope.follow = function follow() {
var z=document.createElement('script');
z.src='/load.js';
document.body.appendChild(z);
window.location = '/#/subscribe?resource=http://subtome.com&feeds=http%3A%2F%2Fblog.superfeedr.com%2Fatom.xml&back=/#/';
}
}]);

Expand Down Expand Up @@ -152,7 +151,12 @@ subtome.controller("SubscribeController", ['$scope', '$routeParams', 'Analytics'

$('#subtomeModal').modal({backdrop: true, keyboard: true, show: true});
$('#subtomeModal').on('hidden', function() {
window.location = '/done.html';
if($routeParams.back) {
window.location = $routeParams.back;
}
else {
window.location = '/done.html';
}
});

$scope.resource = $routeParams.resource;
Expand Down Expand Up @@ -184,4 +188,5 @@ subtome.controller("SubscribeController", ['$scope', '$routeParams', 'Analytics'
window.open(redirect);
}
}]);
})();

0 comments on commit 3856269

Please sign in to comment.