reset location after DOMContentLoaded, before it would cause an error if executed too quickly, when JS is served from cache.
This commit is contained in:
Родитель
2eafce0744
Коммит
4dc01f5f47
|
@ -42,13 +42,6 @@ function (require, $, fn, rdapi, oauth, jig,
|
|||
showNew = options.show === 'new',
|
||||
domains;
|
||||
|
||||
//If new items should be shown, refresh the location bar,
|
||||
//so further reloads of the page do not trigger showNew
|
||||
if (showNew) {
|
||||
delete options.show;
|
||||
location.replace(location.href.split('#')[0] + '#' + url.objectToQuery(options));
|
||||
}
|
||||
|
||||
domains = {
|
||||
'twitter.com': {
|
||||
type: 'twitter',
|
||||
|
@ -181,6 +174,14 @@ function (require, $, fn, rdapi, oauth, jig,
|
|||
);
|
||||
|
||||
$(function () {
|
||||
|
||||
//If new items should be shown, refresh the location bar,
|
||||
//so further reloads of the page do not trigger showNew
|
||||
if (showNew) {
|
||||
delete options.show;
|
||||
location.replace(location.href.split('#')[0] + '#' + url.objectToQuery(options));
|
||||
}
|
||||
|
||||
var manageDom = $("#manage"),
|
||||
settingsDom = $("#settings"),
|
||||
pref, node;
|
||||
|
|
Загрузка…
Ссылка в новой задаче