Navigate.pushState is being used elsewhere...

This commit is contained in:
Zixaphir 2014-07-27 12:52:47 -07:00
parent e6071fe834
commit 7476c51f0f
3 changed files with 26 additions and 11 deletions

View File

@ -16773,10 +16773,11 @@
path += this.hash;
}
Navigate.makeBreadCrumb(this.href, view, boardID, threadID);
if (this.id !== 'popState') {
history.pushState(null, '', path);
if (this.id === 'popState') {
Navigate.path = window.location;
} else {
Navigate.pushState(path);
}
Navigate.path = window.location;
Navigate.setMode(this);
if (!(view === 'index' && 'index' === g.VIEW && boardID === g.BOARD.ID)) {
Navigate.disconnect();
@ -16900,6 +16901,10 @@
return Main.handleErrors(errors);
}
},
pushState: function(path) {
history.pushState(null, '', path);
return Navigate.path = window.location.pathname;
},
popstate: function() {
var a;
a = $.el('a', {

View File

@ -16792,10 +16792,11 @@
path += this.hash;
}
Navigate.makeBreadCrumb(this.href, view, boardID, threadID);
if (this.id !== 'popState') {
history.pushState(null, '', path);
if (this.id === 'popState') {
Navigate.path = window.location;
} else {
Navigate.pushState(path);
}
Navigate.path = window.location;
Navigate.setMode(this);
if (!(view === 'index' && 'index' === g.VIEW && boardID === g.BOARD.ID)) {
Navigate.disconnect();
@ -16919,6 +16920,10 @@
return Main.handleErrors(errors);
}
},
pushState: function(path) {
history.pushState(null, '', path);
return Navigate.path = window.location.pathname;
},
popstate: function() {
var a;
a = $.el('a', {

View File

@ -5,7 +5,7 @@ Navigate =
<% if (type === 'crx') { %>
# blink/webkit throw a popstate on page load. Not what we want.
popstateHack = ->
popstateHack = ->
$.off window, 'popstate', popstateHack
$.on window, 'popstate', Navigate.popstate
@ -189,7 +189,7 @@ Navigate =
$.set 'Index Sort', Conf['Index Sort'] = Index.selectSort.value = indexSort
Index.cb.sort()
result = true
return result
navigate: (e) ->
@ -234,9 +234,10 @@ Navigate =
Navigate.makeBreadCrumb @href, view, boardID, threadID
history.pushState null, '', path unless @id is 'popState'
Navigate.path = window.location
if @id is 'popState'
Navigate.path = window.location
else
Navigate.pushState path
Navigate.setMode @
@ -348,6 +349,10 @@ Navigate =
Main.handleErrors errors if errors
pushState: (path) ->
history.pushState null, '', path
Navigate.path = window.location.pathname
popstate: ->
a = $.el 'a',
href: window.location