Merge Mayhem X
This commit is contained in:
commit
a025c4e8eb
@ -1,5 +1,11 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
seaweedchan:
|
seaweedchan:
|
||||||
- Fix emoji and favicon previews not updating on change.
|
- Fix emoji and favicon previews not updating on change.
|
||||||
|
=======
|
||||||
|
- Fix bug where a thread would freeze on load.
|
||||||
|
|
||||||
|
### 3.2.1 - *2013-04-26*
|
||||||
|
>>>>>>> mayhem/v3
|
||||||
|
|
||||||
### 1.1.1 - 2013-04-26
|
### 1.1.1 - 2013-04-26
|
||||||
zixaphir:
|
zixaphir:
|
||||||
@ -80,4 +86,4 @@ zixaphir:
|
|||||||
- Fix unread post count for filtered posts
|
- Fix unread post count for filtered posts
|
||||||
- Fix issues when switching from ihavenoface's fork
|
- Fix issues when switching from ihavenoface's fork
|
||||||
- Fix backlinks not receiving filtered class
|
- Fix backlinks not receiving filtered class
|
||||||
- Fix QR position not saving on refresh
|
- Fix QR position not saving on refresh
|
||||||
|
|||||||
@ -188,7 +188,7 @@
|
|||||||
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'],
|
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'],
|
||||||
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
|
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
|
||||||
'Hide Original Post Form': [true, 'Hide the normal post form.'],
|
'Hide Original Post Form': [true, 'Hide the normal post form.'],
|
||||||
'Cooldown': [true, 'Prevent "flood detected" errors.'],
|
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
||||||
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.']
|
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.']
|
||||||
},
|
},
|
||||||
'Quote Links': {
|
'Quote Links': {
|
||||||
@ -4303,7 +4303,7 @@
|
|||||||
|
|
||||||
psa = $.id('globalMessage');
|
psa = $.id('globalMessage');
|
||||||
psa.hidden = PSAHiding.btn.hidden = (_ref = PSAHiding.trim(psa), __indexOf.call(hiddenPSAs, _ref) >= 0) ? true : false;
|
psa.hidden = PSAHiding.btn.hidden = (_ref = PSAHiding.trim(psa), __indexOf.call(hiddenPSAs, _ref) >= 0) ? true : false;
|
||||||
if (hr = $.x('following-sibling::hr', psa)) {
|
if ((hr = psa.nextElementSibling) && hr.nodeName === 'HR') {
|
||||||
return hr.hidden = psa.hidden;
|
return hr.hidden = psa.hidden;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -6756,24 +6756,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var ID, post, posts, _ref;
|
|
||||||
|
|
||||||
Unread.thread = this;
|
Unread.thread = this;
|
||||||
Unread.title = d.title;
|
Unread.title = d.title;
|
||||||
posts = [];
|
|
||||||
_ref = this.posts;
|
|
||||||
for (ID in _ref) {
|
|
||||||
post = _ref[ID];
|
|
||||||
if (post.isReply) {
|
|
||||||
posts.push(post);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Unread.lastReadPost = Unread.db.get({
|
Unread.lastReadPost = Unread.db.get({
|
||||||
boardID: this.board.ID,
|
boardID: this.board.ID,
|
||||||
threadID: this.ID,
|
threadID: this.ID,
|
||||||
defaultValue: 0
|
defaultValue: 0
|
||||||
});
|
});
|
||||||
Unread.addPosts(posts);
|
$.on(d, '4chanXInitFinished', Unread.ready);
|
||||||
$.on(d, 'ThreadUpdate', Unread.onUpdate);
|
$.on(d, 'ThreadUpdate', Unread.onUpdate);
|
||||||
$.on(d, 'scroll visibilitychange', Unread.read);
|
$.on(d, 'scroll visibilitychange', Unread.read);
|
||||||
if (Conf['Unread Line']) {
|
if (Conf['Unread Line']) {
|
||||||
@ -6783,15 +6773,35 @@
|
|||||||
return $.on(window, 'load', Unread.scroll);
|
return $.on(window, 'load', Unread.scroll);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ready: function() {
|
||||||
|
var ID, post, posts, _ref;
|
||||||
|
|
||||||
|
$.off(d, '4chanXInitFinished', Unread.ready);
|
||||||
|
posts = [];
|
||||||
|
_ref = Unread.thread.posts;
|
||||||
|
for (ID in _ref) {
|
||||||
|
post = _ref[ID];
|
||||||
|
if (post.isReply) {
|
||||||
|
posts.push(post);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Unread.addPosts(posts);
|
||||||
|
},
|
||||||
scroll: function() {
|
scroll: function() {
|
||||||
var hash, posts, root;
|
var hash, post, posts, prevID, root;
|
||||||
|
|
||||||
if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) {
|
if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Unread.posts.length) {
|
if (Unread.posts.length) {
|
||||||
|
prevID = 0;
|
||||||
while (root = $.x('preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root)) {
|
while (root = $.x('preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root)) {
|
||||||
if (!(Get.postFromRoot(root)).isHidden) {
|
post = Get.postFromRoot(root);
|
||||||
|
if (prevID === post.ID) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
prevID = post.ID;
|
||||||
|
if (!post.isHidden) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -189,7 +189,7 @@
|
|||||||
'Remember QR Size': [false, 'Remember the size of the Quick reply.'],
|
'Remember QR Size': [false, 'Remember the size of the Quick reply.'],
|
||||||
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
|
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
|
||||||
'Hide Original Post Form': [true, 'Hide the normal post form.'],
|
'Hide Original Post Form': [true, 'Hide the normal post form.'],
|
||||||
'Cooldown': [true, 'Prevent "flood detected" errors.'],
|
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
||||||
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.']
|
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.']
|
||||||
},
|
},
|
||||||
'Quote Links': {
|
'Quote Links': {
|
||||||
@ -4299,7 +4299,7 @@
|
|||||||
|
|
||||||
psa = $.id('globalMessage');
|
psa = $.id('globalMessage');
|
||||||
psa.hidden = PSAHiding.btn.hidden = (_ref = PSAHiding.trim(psa), __indexOf.call(hiddenPSAs, _ref) >= 0) ? true : false;
|
psa.hidden = PSAHiding.btn.hidden = (_ref = PSAHiding.trim(psa), __indexOf.call(hiddenPSAs, _ref) >= 0) ? true : false;
|
||||||
if (hr = $.x('following-sibling::hr', psa)) {
|
if ((hr = psa.nextElementSibling) && hr.nodeName === 'HR') {
|
||||||
return hr.hidden = psa.hidden;
|
return hr.hidden = psa.hidden;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -6752,24 +6752,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var ID, post, posts, _ref;
|
|
||||||
|
|
||||||
Unread.thread = this;
|
Unread.thread = this;
|
||||||
Unread.title = d.title;
|
Unread.title = d.title;
|
||||||
posts = [];
|
|
||||||
_ref = this.posts;
|
|
||||||
for (ID in _ref) {
|
|
||||||
post = _ref[ID];
|
|
||||||
if (post.isReply) {
|
|
||||||
posts.push(post);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Unread.lastReadPost = Unread.db.get({
|
Unread.lastReadPost = Unread.db.get({
|
||||||
boardID: this.board.ID,
|
boardID: this.board.ID,
|
||||||
threadID: this.ID,
|
threadID: this.ID,
|
||||||
defaultValue: 0
|
defaultValue: 0
|
||||||
});
|
});
|
||||||
Unread.addPosts(posts);
|
$.on(d, '4chanXInitFinished', Unread.ready);
|
||||||
$.on(d, 'ThreadUpdate', Unread.onUpdate);
|
$.on(d, 'ThreadUpdate', Unread.onUpdate);
|
||||||
$.on(d, 'scroll visibilitychange', Unread.read);
|
$.on(d, 'scroll visibilitychange', Unread.read);
|
||||||
if (Conf['Unread Line']) {
|
if (Conf['Unread Line']) {
|
||||||
@ -6779,15 +6769,35 @@
|
|||||||
return $.on(window, 'load', Unread.scroll);
|
return $.on(window, 'load', Unread.scroll);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ready: function() {
|
||||||
|
var ID, post, posts, _ref;
|
||||||
|
|
||||||
|
$.off(d, '4chanXInitFinished', Unread.ready);
|
||||||
|
posts = [];
|
||||||
|
_ref = Unread.thread.posts;
|
||||||
|
for (ID in _ref) {
|
||||||
|
post = _ref[ID];
|
||||||
|
if (post.isReply) {
|
||||||
|
posts.push(post);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Unread.addPosts(posts);
|
||||||
|
},
|
||||||
scroll: function() {
|
scroll: function() {
|
||||||
var hash, posts, root;
|
var hash, post, posts, prevID, root;
|
||||||
|
|
||||||
if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) {
|
if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Unread.posts.length) {
|
if (Unread.posts.length) {
|
||||||
|
prevID = 0;
|
||||||
while (root = $.x('preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root)) {
|
while (root = $.x('preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root)) {
|
||||||
if (!(Get.postFromRoot(root)).isHidden) {
|
post = Get.postFromRoot(root);
|
||||||
|
if (prevID === post.ID) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
prevID = post.ID;
|
||||||
|
if (!post.isHidden) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,7 @@
|
|||||||
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'],
|
'Remember Subject': [false, 'Remember the subject field, instead of resetting after posting.'],
|
||||||
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
|
'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.'],
|
||||||
'Hide Original Post Form': [true, 'Hide the normal post form.'],
|
'Hide Original Post Form': [true, 'Hide the normal post form.'],
|
||||||
'Cooldown': [true, 'Prevent "flood detected" errors.'],
|
'Cooldown': [true, 'Indicate the remaining time before posting again.'],
|
||||||
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.']
|
'Cooldown Prediction': [true, 'Decrease the cooldown time by taking into account upload speed. Disable it if it\'s inaccurate for you.']
|
||||||
},
|
},
|
||||||
'Quote Links': {
|
'Quote Links': {
|
||||||
@ -4212,7 +4212,7 @@
|
|||||||
|
|
||||||
psa = $.id('globalMessage');
|
psa = $.id('globalMessage');
|
||||||
psa.hidden = PSAHiding.btn.hidden = (_ref = PSAHiding.trim(psa), __indexOf.call(hiddenPSAs, _ref) >= 0) ? true : false;
|
psa.hidden = PSAHiding.btn.hidden = (_ref = PSAHiding.trim(psa), __indexOf.call(hiddenPSAs, _ref) >= 0) ? true : false;
|
||||||
if (hr = $.x('following-sibling::hr', psa)) {
|
if ((hr = psa.nextElementSibling) && hr.nodeName === 'HR') {
|
||||||
return hr.hidden = psa.hidden;
|
return hr.hidden = psa.hidden;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -6665,24 +6665,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var ID, post, posts, _ref;
|
|
||||||
|
|
||||||
Unread.thread = this;
|
Unread.thread = this;
|
||||||
Unread.title = d.title;
|
Unread.title = d.title;
|
||||||
posts = [];
|
|
||||||
_ref = this.posts;
|
|
||||||
for (ID in _ref) {
|
|
||||||
post = _ref[ID];
|
|
||||||
if (post.isReply) {
|
|
||||||
posts.push(post);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Unread.lastReadPost = Unread.db.get({
|
Unread.lastReadPost = Unread.db.get({
|
||||||
boardID: this.board.ID,
|
boardID: this.board.ID,
|
||||||
threadID: this.ID,
|
threadID: this.ID,
|
||||||
defaultValue: 0
|
defaultValue: 0
|
||||||
});
|
});
|
||||||
Unread.addPosts(posts);
|
$.on(d, '4chanXInitFinished', Unread.ready);
|
||||||
$.on(d, 'ThreadUpdate', Unread.onUpdate);
|
$.on(d, 'ThreadUpdate', Unread.onUpdate);
|
||||||
$.on(d, 'scroll visibilitychange', Unread.read);
|
$.on(d, 'scroll visibilitychange', Unread.read);
|
||||||
if (Conf['Unread Line']) {
|
if (Conf['Unread Line']) {
|
||||||
@ -6692,15 +6682,35 @@
|
|||||||
return $.on(window, 'load', Unread.scroll);
|
return $.on(window, 'load', Unread.scroll);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
ready: function() {
|
||||||
|
var ID, post, posts, _ref;
|
||||||
|
|
||||||
|
$.off(d, '4chanXInitFinished', Unread.ready);
|
||||||
|
posts = [];
|
||||||
|
_ref = Unread.thread.posts;
|
||||||
|
for (ID in _ref) {
|
||||||
|
post = _ref[ID];
|
||||||
|
if (post.isReply) {
|
||||||
|
posts.push(post);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Unread.addPosts(posts);
|
||||||
|
},
|
||||||
scroll: function() {
|
scroll: function() {
|
||||||
var hash, posts, root;
|
var hash, post, posts, prevID, root;
|
||||||
|
|
||||||
if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) {
|
if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Unread.posts.length) {
|
if (Unread.posts.length) {
|
||||||
|
prevID = 0;
|
||||||
while (root = $.x('preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root)) {
|
while (root = $.x('preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root)) {
|
||||||
if (!(Get.postFromRoot(root)).isHidden) {
|
post = Get.postFromRoot(root);
|
||||||
|
if (prevID === post.ID) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
prevID = post.ID;
|
||||||
|
if (!post.isHidden) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -267,7 +267,7 @@ Config =
|
|||||||
]
|
]
|
||||||
'Cooldown': [
|
'Cooldown': [
|
||||||
true
|
true
|
||||||
'Prevent "flood detected" errors.'
|
'Indicate the remaining time before posting again.'
|
||||||
]
|
]
|
||||||
'Cooldown Prediction': [
|
'Cooldown Prediction': [
|
||||||
true
|
true
|
||||||
|
|||||||
@ -61,7 +61,7 @@ PSAHiding =
|
|||||||
true
|
true
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
if hr = $.x 'following-sibling::hr', psa
|
if (hr = psa.nextElementSibling) and hr.nodeName is 'HR'
|
||||||
hr.hidden = psa.hidden
|
hr.hidden = psa.hidden
|
||||||
trim: (psa) ->
|
trim: (psa) ->
|
||||||
psa.textContent.replace(/\W+/g, '').toLowerCase()
|
psa.textContent.replace(/\W+/g, '').toLowerCase()
|
||||||
|
|||||||
@ -15,26 +15,34 @@ Unread =
|
|||||||
node: ->
|
node: ->
|
||||||
Unread.thread = @
|
Unread.thread = @
|
||||||
Unread.title = d.title
|
Unread.title = d.title
|
||||||
posts = []
|
|
||||||
for ID, post of @posts
|
|
||||||
posts.push post if post.isReply
|
|
||||||
Unread.lastReadPost = Unread.db.get
|
Unread.lastReadPost = Unread.db.get
|
||||||
boardID: @board.ID
|
boardID: @board.ID
|
||||||
threadID: @ID
|
threadID: @ID
|
||||||
defaultValue: 0
|
defaultValue: 0
|
||||||
Unread.addPosts posts
|
$.on d, '4chanXInitFinished', Unread.ready
|
||||||
$.on d, 'ThreadUpdate', Unread.onUpdate
|
$.on d, 'ThreadUpdate', Unread.onUpdate
|
||||||
$.on d, 'scroll visibilitychange', Unread.read
|
$.on d, 'scroll visibilitychange', Unread.read
|
||||||
$.on d, 'visibilitychange', Unread.setLine if Conf['Unread Line']
|
$.on d, 'visibilitychange', Unread.setLine if Conf['Unread Line']
|
||||||
$.on window, 'load', Unread.scroll if Conf['Scroll to Last Read Post']
|
$.on window, 'load', Unread.scroll if Conf['Scroll to Last Read Post']
|
||||||
|
|
||||||
|
ready: ->
|
||||||
|
$.off d, '4chanXInitFinished', Unread.ready
|
||||||
|
posts = []
|
||||||
|
for ID, post of Unread.thread.posts
|
||||||
|
posts.push post if post.isReply
|
||||||
|
Unread.addPosts posts
|
||||||
|
|
||||||
scroll: ->
|
scroll: ->
|
||||||
# Let the header's onload callback handle it.
|
# Let the header's onload callback handle it.
|
||||||
return if (hash = location.hash.match /\d+/) and hash[0] of Unread.thread.posts
|
return if (hash = location.hash.match /\d+/) and hash[0] of Unread.thread.posts
|
||||||
if Unread.posts.length
|
if Unread.posts.length
|
||||||
# Scroll to before the first unread post.
|
# Scroll to before the first unread post.
|
||||||
|
prevID = 0
|
||||||
while root = $.x 'preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root
|
while root = $.x 'preceding-sibling::div[contains(@class,"postContainer")][1]', Unread.posts[0].nodes.root
|
||||||
break unless (Get.postFromRoot root).isHidden
|
post = Get.postFromRoot root
|
||||||
|
break if prevID is post.ID
|
||||||
|
prevID = post.ID
|
||||||
|
break unless post.isHidden
|
||||||
root.scrollIntoView false
|
root.scrollIntoView false
|
||||||
return
|
return
|
||||||
# Scroll to the last read post.
|
# Scroll to the last read post.
|
||||||
@ -175,4 +183,4 @@ Unread =
|
|||||||
# `favicon.href = href` isn't enough on Opera.
|
# `favicon.href = href` isn't enough on Opera.
|
||||||
# Opera won't always update the favicon if the href didn't change.
|
# Opera won't always update the favicon if the href didn't change.
|
||||||
$.add d.head, Favicon.el
|
$.add d.head, Favicon.el
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user