Improve Scroll to Post Quoting You logic

This commit is contained in:
Zixaphir 2014-03-26 15:31:26 -07:00
parent f6ea1ed52c
commit 1afcdd011c
4 changed files with 11 additions and 7 deletions

View File

@ -57,8 +57,11 @@
- JSON Navigation now works for backlinks (when Quote Inlining is disabled) and backlink hashlinks.
- JSON Navigation (Index, Catalog) performance improvements.
- Added a nifty bread-crumb for the JSON Navigation.
- Many spiffy performance, state awareness, and sanity improvements to JSON Navigation.
- Added a return button to the JSON Navigation that will switch you back to non-catalog view (requires NavLinks not to be hidden).
- Rewrote "Scroll to post quoting you" functionality, solving several small issues with it.
- Improved Linkifier link detection.
- Fixed an issue with Thread Updater intervals not saving correctly.
- Many spiffy performance, state awareness, and sanity improvements to JSON Navigation.
### v1.4.1
*2014-03-01*

View File

@ -5531,7 +5531,7 @@
len = posts.length - 1;
index = i = posts.indexOf(post);
while (true) {
if (index === (i = i === 0 ? len : i === len ? 0 : type === 'prev' ? i - 1 : i + 1)) {
if (index === (i = type === 'prev' ? i === 0 ? len : i - 1 : i === len ? 0 : i + 1)) {
break;
}
post = posts[i];

View File

@ -5585,7 +5585,7 @@
len = posts.length - 1;
index = i = posts.indexOf(post);
while (true) {
if (index === (i = i === 0 ? len : i === len ? 0 : type === 'prev' ? i - 1 : i + 1)) {
if (index === (i = type === 'prev' ? i === 0 ? len : i - 1 : i === len ? 0 : i + 1)) {
break;
}
post = posts[i];

View File

@ -66,12 +66,13 @@ QuoteMarkers =
index = i = posts.indexOf post
while true
break if index is (
i = if i is 0
len
i = if type is 'prev'
if i is 0
len
else
i - 1
else if i is len
0
else if type is 'prev'
i - 1
else
i + 1
)