Bad state-tracking fail
This commit is contained in:
Zixaphir 2014-07-27 12:51:03 -07:00
parent bf8fedb659
commit e6071fe834
4 changed files with 20 additions and 28 deletions

View File

@ -1,5 +1,5 @@
/* /*
* appchan x - Version 2.9.31 - 2014-07-26 * appchan x - Version 2.9.31 - 2014-07-27
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE * https://github.com/zixaphir/appchan-x/blob/master/LICENSE

View File

@ -25,7 +25,7 @@
// ==/UserScript== // ==/UserScript==
/* /*
* appchan x - Version 2.9.31 - 2014-07-26 * appchan x - Version 2.9.31 - 2014-07-27
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE * https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -16774,8 +16774,9 @@
} }
Navigate.makeBreadCrumb(this.href, view, boardID, threadID); Navigate.makeBreadCrumb(this.href, view, boardID, threadID);
if (this.id !== 'popState') { if (this.id !== 'popState') {
Navigate.pushState(path); history.pushState(null, '', path);
} }
Navigate.path = window.location;
Navigate.setMode(this); Navigate.setMode(this);
if (!(view === 'index' && 'index' === g.VIEW && boardID === g.BOARD.ID)) { if (!(view === 'index' && 'index' === g.VIEW && boardID === g.BOARD.ID)) {
Navigate.disconnect(); Navigate.disconnect();
@ -16854,12 +16855,12 @@
} }
}, },
parse: function(data) { parse: function(data) {
var OP, board, errors, i, makePost, obj, post, posts, thread, threadRoot; var board, errors, i, makePost, obj, post, posts, thread, threadRoot;
posts = []; posts = [];
errors = null; errors = null;
board = g.BOARD; board = g.BOARD;
threadRoot = Build.thread(board, OP = data[0], true); threadRoot = Build.thread(board, data[0], true);
thread = new Thread(OP.no, board); thread = new Thread(data[0].no, board);
makePost = function(postNode) { makePost = function(postNode) {
var err; var err;
try { try {
@ -16899,10 +16900,6 @@
return Main.handleErrors(errors); return Main.handleErrors(errors);
} }
}, },
pushState: function(path) {
history.pushState(null, '', path);
return Navigate.path = window.location.pathname;
},
popstate: function() { popstate: function() {
var a; var a;
a = $.el('a', { a = $.el('a', {

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript // Generated by CoffeeScript
/* /*
* appchan x - Version 2.9.31 - 2014-07-26 * appchan x - Version 2.9.31 - 2014-07-27
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE * https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -16793,8 +16793,9 @@
} }
Navigate.makeBreadCrumb(this.href, view, boardID, threadID); Navigate.makeBreadCrumb(this.href, view, boardID, threadID);
if (this.id !== 'popState') { if (this.id !== 'popState') {
Navigate.pushState(path); history.pushState(null, '', path);
} }
Navigate.path = window.location;
Navigate.setMode(this); Navigate.setMode(this);
if (!(view === 'index' && 'index' === g.VIEW && boardID === g.BOARD.ID)) { if (!(view === 'index' && 'index' === g.VIEW && boardID === g.BOARD.ID)) {
Navigate.disconnect(); Navigate.disconnect();
@ -16873,12 +16874,12 @@
} }
}, },
parse: function(data) { parse: function(data) {
var OP, board, errors, i, makePost, obj, post, posts, thread, threadRoot; var board, errors, i, makePost, obj, post, posts, thread, threadRoot;
posts = []; posts = [];
errors = null; errors = null;
board = g.BOARD; board = g.BOARD;
threadRoot = Build.thread(board, OP = data[0], true); threadRoot = Build.thread(board, data[0], true);
thread = new Thread(OP.no, board); thread = new Thread(data[0].no, board);
makePost = function(postNode) { makePost = function(postNode) {
var err; var err;
try { try {
@ -16918,10 +16919,6 @@
return Main.handleErrors(errors); return Main.handleErrors(errors);
} }
}, },
pushState: function(path) {
history.pushState(null, '', path);
return Navigate.path = window.location.pathname;
},
popstate: function() { popstate: function() {
var a; var a;
a = $.el('a', { a = $.el('a', {

View File

@ -234,7 +234,9 @@ Navigate =
Navigate.makeBreadCrumb @href, view, boardID, threadID Navigate.makeBreadCrumb @href, view, boardID, threadID
Navigate.pushState path unless @id is 'popState' history.pushState null, '', path unless @id is 'popState'
Navigate.path = window.location
Navigate.setMode @ Navigate.setMode @
@ -309,8 +311,8 @@ Navigate =
posts = [] posts = []
errors = null errors = null
board = g.BOARD board = g.BOARD
threadRoot = Build.thread board, OP = data[0], true threadRoot = Build.thread board, data[0], true
thread = new Thread OP.no, board thread = new Thread data[0].no, board
makePost = (postNode) -> makePost = (postNode) ->
try try
@ -346,10 +348,6 @@ Navigate =
Main.handleErrors errors if errors Main.handleErrors errors if errors
pushState: (path) ->
history.pushState null, '', path
Navigate.path = window.location.pathname
popstate: -> popstate: ->
a = $.el 'a', a = $.el 'a',
href: window.location href: window.location