make chrome think every bookmark click is a different url in order to create history entries (fix #488)

This commit is contained in:
Athou
2013-08-14 10:43:10 +02:00
parent 1e13c11061
commit 1076527b62
3 changed files with 5 additions and 3 deletions

View File

@@ -1406,6 +1406,7 @@ module.controller('HelpController', ['$scope', 'CategoryService', 'AnalyticsServ
$scope.infos = ServerService.get();
$scope.categoryId = 'all';
$scope.order = 'desc';
$scope.baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf('#'));
}]);

View File

@@ -1,9 +1,10 @@
var app = angular.module('commafeed', ['ui', 'ui.bootstrap', 'ui.state', 'commafeed.directives', 'commafeed.controllers',
'commafeed.services', 'commafeed.filters', 'ngSanitize', 'infinite-scroll', 'ngGrid']);
app.config(['$routeProvider', '$stateProvider', '$urlRouterProvider', '$httpProvider',
function($routeProvider, $stateProvider, $urlRouterProvider, $httpProvider) {
app.config(['$routeProvider', '$stateProvider', '$urlRouterProvider', '$httpProvider', '$compileProvider',
function($routeProvider, $stateProvider, $urlRouterProvider, $httpProvider, $compileProvider) {
$compileProvider.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|javascript):/);
var interceptor = ['$rootScope', '$q', function(scope, $q) {
var success = function(response) {

View File

@@ -69,7 +69,7 @@
<option value="desc">${about.goodies.subscribe_bookmarklet_desc}</option>
<option value="asc">${about.goodies.subscribe_bookmarklet_asc}</option>
</select>
<a href="next?category={{categoryId}}&order={{order}}" target="_blank">${global.link}</a>
<a href="javascript:window.location.href='{{baseUrl}}next?category={{categoryId}}&order={{order}}&t='+new Date().getTime();" target="_blank">${global.link}</a>
</p>
</div>