For real this time, fix that shit.
This commit is contained in:
parent
f5c9927914
commit
44f778c754
@ -8332,8 +8332,6 @@
|
||||
clean: function() {
|
||||
var age, name, pruned, uid, _ref, _ref1;
|
||||
pruned = false;
|
||||
c.log('cleaning');
|
||||
c.log(Object.keys(Conf.CachedTitles).length);
|
||||
_ref = Conf['CachedTitles'];
|
||||
for (uid in _ref) {
|
||||
_ref1 = _ref[uid], name = _ref1[0], age = _ref1[1];
|
||||
@ -8343,8 +8341,6 @@
|
||||
pruned = true;
|
||||
delete Conf['CachedTitles'][uid];
|
||||
}
|
||||
c.log(Object.keys(Conf.CachedTitles).length);
|
||||
c.log('cleaned');
|
||||
if (pruned) {
|
||||
return $.set('CachedTitles', Conf['CachedTitles']);
|
||||
}
|
||||
@ -16292,8 +16288,8 @@
|
||||
if (g.BOARD.ID === 'f' || !Conf['JSON Navigation']) {
|
||||
return;
|
||||
}
|
||||
$.on(window, 'popstate', Navigate.popstate);
|
||||
$.ready(function() {
|
||||
$.on(window, 'popstate', Navigate.popstate);
|
||||
Navigate.makeBreadCrumb(window.location, g.VIEW, g.BOARD.ID, g.THREADID);
|
||||
return $.add(Index.navLinks, Navigate.el);
|
||||
});
|
||||
@ -16560,7 +16556,7 @@
|
||||
}
|
||||
Navigate.makeBreadCrumb(this.href, view, boardID, threadID);
|
||||
if (this.id !== 'popState') {
|
||||
history.pushState(null, '', path);
|
||||
history.pushState('internal', '', path);
|
||||
}
|
||||
Navigate.path = this.pathname;
|
||||
Navigate.setMode(this);
|
||||
|
||||
@ -8383,8 +8383,6 @@
|
||||
clean: function() {
|
||||
var age, name, pruned, uid, _ref, _ref1;
|
||||
pruned = false;
|
||||
c.log('cleaning');
|
||||
c.log(Object.keys(Conf.CachedTitles).length);
|
||||
_ref = Conf['CachedTitles'];
|
||||
for (uid in _ref) {
|
||||
_ref1 = _ref[uid], name = _ref1[0], age = _ref1[1];
|
||||
@ -8394,8 +8392,6 @@
|
||||
pruned = true;
|
||||
delete Conf['CachedTitles'][uid];
|
||||
}
|
||||
c.log(Object.keys(Conf.CachedTitles).length);
|
||||
c.log('cleaned');
|
||||
if (pruned) {
|
||||
return $.set('CachedTitles', Conf['CachedTitles']);
|
||||
}
|
||||
@ -16308,11 +16304,16 @@
|
||||
Navigate = {
|
||||
path: window.location.pathname,
|
||||
init: function() {
|
||||
var popstateHack;
|
||||
if (g.BOARD.ID === 'f' || !Conf['JSON Navigation']) {
|
||||
return;
|
||||
}
|
||||
popstateHack = function() {
|
||||
$.off(window, 'popstate', popstateHack);
|
||||
return $.on(window, 'popstate', Navigate.popstate);
|
||||
};
|
||||
$.on(window, 'popstate', popstateHack);
|
||||
$.ready(function() {
|
||||
$.on(window, 'popstate', Navigate.popstate);
|
||||
Navigate.makeBreadCrumb(window.location, g.VIEW, g.BOARD.ID, g.THREADID);
|
||||
return $.add(Index.navLinks, Navigate.el);
|
||||
});
|
||||
@ -16579,7 +16580,7 @@
|
||||
}
|
||||
Navigate.makeBreadCrumb(this.href, view, boardID, threadID);
|
||||
if (this.id !== 'popState') {
|
||||
history.pushState(null, '', path);
|
||||
history.pushState('internal', '', path);
|
||||
}
|
||||
Navigate.path = this.pathname;
|
||||
Navigate.setMode(this);
|
||||
|
||||
@ -3,9 +3,18 @@ Navigate =
|
||||
init: ->
|
||||
return if g.BOARD.ID is 'f' or !Conf['JSON Navigation']
|
||||
|
||||
<% if (type === 'crx') { %>
|
||||
# blink/webkit throw a popstate on page load. Not what we want.
|
||||
popstateHack = ->
|
||||
$.off window, 'popstate', popstateHack
|
||||
$.on window, 'popstate', Navigate.popstate
|
||||
|
||||
$.on window, 'popstate', popstateHack
|
||||
<% } else { %>
|
||||
$.on window, 'popstate', Navigate.popstate
|
||||
<% } %>
|
||||
|
||||
$.ready ->
|
||||
# blink/webkit throw a popstate on page load. Not what we want.
|
||||
$.on window, 'popstate', Navigate.popstate
|
||||
Navigate.makeBreadCrumb window.location, g.VIEW, g.BOARD.ID, g.THREADID
|
||||
$.add Index.navLinks, Navigate.el
|
||||
|
||||
@ -221,7 +230,7 @@ Navigate =
|
||||
|
||||
Navigate.makeBreadCrumb @href, view, boardID, threadID
|
||||
|
||||
history.pushState null, '', path unless @id is 'popState'
|
||||
history.pushState 'internal', '', path unless @id is 'popState'
|
||||
Navigate.path = @pathname
|
||||
|
||||
Navigate.setMode @
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user