mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
change hash take 2
This commit is contained in:
@@ -1023,7 +1023,12 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
|
||||
localStorage.removeItem("topic:" + templates.get('topic_id') + ":bookmark");
|
||||
} else {
|
||||
localStorage.setItem("topic:" + templates.get('topic_id') + ":bookmark", el.attr('data-pid'));
|
||||
window.location.hash = el.attr('data-pid');
|
||||
|
||||
if(history.pushState) {
|
||||
history.replaceState(null, window.location.protocol + '//' + window.location.host + window.location.pathname, '#' + el.attr('data-pid'));
|
||||
} else {
|
||||
location.hash = '#' + el.attr('data-pid');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user