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