Make it possible to paste a #narrow URL into a new tab

(imported from commit 0a2ac3e7100627fd02874b02c1b5abe6d4b58c77)
This commit is contained in:
Jeff Arnold 2012-12-17 18:31:21 -05:00
parent 470ff676e6
commit f4ddf4412b
2 changed files with 3 additions and 2 deletions

View File

@ -31,6 +31,7 @@ function hashchanged() {
exports.initialize = function () {
window.onhashchange = hashchanged;
hashchanged();
};
return exports;

View File

@ -36,12 +36,12 @@ function preserve_compose(send_after_reload) {
// done before the first call to get_updates
$(function () {
var location = window.location.toString();
window.location.hash = '';
util.reset_favicon();
var fragment = location.substring(location.indexOf('#') + 1);
if (fragment.search("reload:") !== 0) {
return;
}
window.location.hash = '';
util.reset_favicon();
fragment = fragment.replace(/^reload:/, "");
var keyvals = fragment.split("+");