mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Make the back button work for the settings and subscriptions pages
(imported from commit 650c884abc9514cdfc934ae01e0a490f5f681292)
This commit is contained in:
@@ -18,6 +18,10 @@ exports.home_tab_obscured = function () {
|
||||
var scroll_positions = {};
|
||||
var gravatar_stamp = 1;
|
||||
|
||||
exports.change_tab_to = function (tabname) {
|
||||
$('#sidebar a[href="' + tabname + '"]').tab('show');
|
||||
};
|
||||
|
||||
exports.focus_on = function (field_id) {
|
||||
// Call after autocompleting on a field, to advance the focus to
|
||||
// the next input field.
|
||||
@@ -505,9 +509,9 @@ $(function () {
|
||||
// Set the URL bar title to show the sub-page you're currently on.
|
||||
var browser_url = target_tab;
|
||||
if (browser_url === "#home") {
|
||||
browser_url = "#";
|
||||
browser_url = "";
|
||||
}
|
||||
window.history.pushState("object or string", "Title", browser_url);
|
||||
hashchange.changehash(browser_url);
|
||||
});
|
||||
|
||||
$('#sidebar a[href="#subscriptions"]').click(subs.fetch);
|
||||
|
||||
Reference in New Issue
Block a user