diff --git a/CHANGELOG.md b/CHANGELOG.md
index 357c85e2a..72e162cac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
### v1.11.20
+**v1.11.20.1** *(2015-12-07)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.20.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.20.1/builds/4chan-X-noupdate.crx "Chromium version")]
+- Fix 4chan X scrolling to wrong position when back button is used.
+
**v1.11.20.0** *(2015-12-07)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.20.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.20.0/builds/4chan-X-noupdate.crx "Chromium version")]
- Based on v1.11.19.5.
- Cosmetic fixes for blocked ads.
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index 57a5bed36..3b9600b06 100644
Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ
diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js
index 5d716464f..a2e90c5b4 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.20.0
+// @version 1.11.20.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js
index e8ef23ee2..6593d86d9 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.20.0
+// @version 1.11.20.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -433,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.20.0',
+ VERSION: '1.11.20.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -2694,7 +2694,7 @@
}
]
});
- $.on(window, 'load hashchange', Header.hashScroll);
+ $.on(window, 'load popstate', Header.hashScroll);
$.on(d, 'CreateNotification', this.createNotification);
$.asap((function() {
return d.body;
@@ -3080,8 +3080,14 @@
settings = $.id('fourchanx-settings');
return $('[name=boardnav]', settings).focus();
},
- hashScroll: function() {
+ hashScroll: function(e) {
var hash, post;
+ if (e.state) {
+ return;
+ }
+ if (!history.state) {
+ history.replaceState({}, '');
+ }
hash = this.location.hash.slice(1);
if (!(/^p\d+$/.test(hash) && (post = $.id(hash)))) {
return;
@@ -3089,7 +3095,9 @@
if ((Get.postFromRoot(post)).isHidden) {
return;
}
- return Header.scrollTo(post);
+ return $.queueTask(function() {
+ return Header.scrollTo(post);
+ });
},
scrollTo: function(root, down, needed) {
var height, x;
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index baab7b5ea..a103f0768 100644
Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ
diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js
index e7e028219..71c5bd975 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.20.0
+// @version 1.11.20.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -433,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.20.0',
+ VERSION: '1.11.20.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -2694,7 +2694,7 @@
}
]
});
- $.on(window, 'load hashchange', Header.hashScroll);
+ $.on(window, 'load popstate', Header.hashScroll);
$.on(d, 'CreateNotification', this.createNotification);
$.asap((function() {
return d.body;
@@ -3080,8 +3080,14 @@
settings = $.id('fourchanx-settings');
return $('[name=boardnav]', settings).focus();
},
- hashScroll: function() {
+ hashScroll: function(e) {
var hash, post;
+ if (e.state) {
+ return;
+ }
+ if (!history.state) {
+ history.replaceState({}, '');
+ }
hash = this.location.hash.slice(1);
if (!(/^p\d+$/.test(hash) && (post = $.id(hash)))) {
return;
@@ -3089,7 +3095,9 @@
if ((Get.postFromRoot(post)).isHidden) {
return;
}
- return Header.scrollTo(post);
+ return $.queueTask(function() {
+ return Header.scrollTo(post);
+ });
},
scrollTo: function(root, down, needed) {
var height, x;
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index fe4812a74..15ce2d420 100644
Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index b1d7c05dd..4b6c74bc3 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.11.20.0
+// @version 1.11.20.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 7f5d0c273..b9f0e2566 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.20.0
+// @version 1.11.20.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -433,7 +433,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.20.0',
+ VERSION: '1.11.20.1',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -2694,7 +2694,7 @@
}
]
});
- $.on(window, 'load hashchange', Header.hashScroll);
+ $.on(window, 'load popstate', Header.hashScroll);
$.on(d, 'CreateNotification', this.createNotification);
$.asap((function() {
return d.body;
@@ -3080,8 +3080,14 @@
settings = $.id('fourchanx-settings');
return $('[name=boardnav]', settings).focus();
},
- hashScroll: function() {
+ hashScroll: function(e) {
var hash, post;
+ if (e.state) {
+ return;
+ }
+ if (!history.state) {
+ history.replaceState({}, '');
+ }
hash = this.location.hash.slice(1);
if (!(/^p\d+$/.test(hash) && (post = $.id(hash)))) {
return;
@@ -3089,7 +3095,9 @@
if ((Get.postFromRoot(post)).isHidden) {
return;
}
- return Header.scrollTo(post);
+ return $.queueTask(function() {
+ return Header.scrollTo(post);
+ });
},
scrollTo: function(root, down, needed) {
var height, x;
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 34492be37..b963c1a26 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index d7a13f717..e74740cb1 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.xml b/builds/updates.xml
index 8ca26d84d..5a1e5a71d 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/version.json b/version.json
index 259aa83e3..560c631c0 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.11.20.0",
- "date": "2015-12-07T09:32:57.887Z"
+ "version": "1.11.20.1",
+ "date": "2015-12-08T04:43:04.140Z"
}