Resolve changelog conflict.

This commit is contained in:
ahodesuka 2012-02-23 14:41:10 -06:00
commit 4ebf66f61f
3 changed files with 51 additions and 29 deletions

View File

@ -395,7 +395,7 @@
}, },
x: function(path, root) { x: function(path, root) {
if (root == null) root = d.body; if (root == null) root = d.body;
return d.evaluate(path, root, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue; return d.evaluate(path, root, null, 8, null).singleNodeValue;
}, },
replace: function(root, el) { replace: function(root, el) {
return root.parentNode.replaceChild(el, root); return root.parentNode.replaceChild(el, root);
@ -633,7 +633,7 @@
}, },
email: function(root) { email: function(root) {
var mail; var mail;
if (!(mail = $('.linkmail', root))) return mail.href; if (mail = $('.linkmail', root)) return mail.href;
return false; return false;
}, },
subject: function(root, isOP) { subject: function(root, isOP) {
@ -642,18 +642,13 @@
return sub.textContent; return sub.textContent;
}, },
comment: function(root) { comment: function(root) {
var i, len, node, nodes, text; var data, i, len, nodes, text;
text = []; text = [];
nodes = d.evaluate('.//node()', root.lastChild, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); nodes = d.evaluate('.//br|.//text()', root.lastChild, null, 7, null);
i = 0; i = 0;
len = nodes.snapshotLength; len = nodes.snapshotLength;
while (i < len) { while (i < len) {
node = nodes.snapshotItem(i++); text.push((data = nodes.snapshotItem(i++).data) ? data : '\n');
if (node instanceof Text) {
text.push(node.data);
} else if (node instanceof HTMLBRElement) {
text.push('\n');
}
} }
return text.join(''); return text.join('');
}, },
@ -798,6 +793,7 @@
num = (function() { num = (function() {
switch (g.BOARD) { switch (g.BOARD) {
case 'b': case 'b':
case 'vg':
return 3; return 3;
case 't': case 't':
return 1; return 1;
@ -1530,7 +1526,7 @@
className: 'preview', className: 'preview',
draggable: true, draggable: true,
href: 'javascript:;', href: 'javascript:;',
innerHTML: '<a class=remove>x</a><label hidden><input type=checkbox> Spoiler</label><span></span>' innerHTML: '<a class=remove>&times;</a><label hidden><input type=checkbox> Spoiler</label><span></span>'
}); });
$('input', this.el).checked = this.spoiler; $('input', this.el).checked = this.spoiler;
$.on(this.el, 'click', function() { $.on(this.el, 'click', function() {
@ -1724,7 +1720,7 @@
qr.el = ui.dialog('qr', 'top:0;right:0;', '\ qr.el = ui.dialog('qr', 'top:0;right:0;', '\
<div class=move>\ <div class=move>\
Quick Reply <input type=checkbox id=autohide title=Auto-hide>\ Quick Reply <input type=checkbox id=autohide title=Auto-hide>\
<span> <a class=close title=Close>x</a></span>\ <span> <a class=close title=Close>&times;</a></span>\
</div>\ </div>\
<form>\ <form>\
<div><input id=dump class=field type=button title="Dump list" value=+><input name=name title=Name placeholder=Name class=field size=1><input name=email title=E-mail placeholder=E-mail class=field size=1><input name=sub title=Subject placeholder=Subject class=field size=1></div>\ <div><input id=dump class=field type=button title="Dump list" value=+><input name=name title=Name placeholder=Name class=field size=1><input name=email title=E-mail placeholder=E-mail class=field size=1><input name=sub title=Subject placeholder=Subject class=field size=1></div>\
@ -2121,7 +2117,8 @@
className: 'reply dialog', className: 'reply dialog',
innerHTML: '<div id=optionsbar>\ innerHTML: '<div id=optionsbar>\
<div id=credits>\ <div id=credits>\
<a target=_blank href=http://mayhemydg.github.com/4chan-x/>4chan X</a> | ' + VERSION + '\ <a target=_blank href=http://mayhemydg.github.com/4chan-x/>4chan X</a>\
| <a target=_blank href=https://raw.github.com/mayhemydg/4chan-x/master/changelog>' + VERSION + '</a>\
| <a target=_blank href=http://mayhemydg.github.com/4chan-x/#bug-report>Issues</a>\ | <a target=_blank href=http://mayhemydg.github.com/4chan-x/#bug-report>Issues</a>\
</div>\ </div>\
<div>\ <div>\
@ -2682,7 +2679,7 @@
for (id in _ref) { for (id in _ref) {
props = _ref[id]; props = _ref[id];
x = $.el('a', { x = $.el('a', {
textContent: 'X', textContent: '\u00d7',
href: 'javascript:;' href: 'javascript:;'
}); });
$.on(x, 'click', watcher.cb.x); $.on(x, 'click', watcher.cb.x);
@ -3370,6 +3367,7 @@
threadStats.imgLimit = (function() { threadStats.imgLimit = (function() {
switch (g.BOARD) { switch (g.BOARD) {
case 'a': case 'a':
case 'mlp':
case 'v': case 'v':
return 251; return 251;
case 'vg': case 'vg':
@ -3483,6 +3481,7 @@
case 'm': case 'm':
case 'tg': case 'tg':
case 'u': case 'u':
case 'vg':
return "http://archive.foolz.us/" + href[3] + "/full_image/" + href[5]; return "http://archive.foolz.us/" + href[3] + "/full_image/" + href[5];
} }
}, },
@ -4154,6 +4153,16 @@ img[md5], img[md5] + img {\
.presto > .fitwidth img[md5] + img {\ .presto > .fitwidth img[md5] + img {\
width: 100%;\ width: 100%;\
}\ }\
/* revealed spoilers do not have height/width,\
this fixed "expanded" auto-gifs */\
img[md5] {\
max-height: 251px;\
max-width: 251px;\
}\
td > .filesize > img[md5] {\
max-height: 126px;\
max-width: 126px;\
}\
\ \
#qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks {\ #qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks {\
position: fixed;\ position: fixed;\

View File

@ -5,10 +5,13 @@ master
- Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default). - Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default).
- Resolution/PDF: %r - Resolution/PDF: %r
- Original filename: %n, %N. - Original filename: %n, %N.
- noface
Update imagelimit for mlp.
2.27.1 2.27.1
- Mayhem - Mayhem
Fix stubs with the new filter. Fix stubs with the new filter.
Fix mail filtering.
The MD5 will now check for exact string matching, it will not use regular expressions. The MD5 will now check for exact string matching, it will not use regular expressions.
2.27.0 2.27.0

View File

@ -304,7 +304,8 @@ $.extend $,
$.add d.head, style $.add d.head, style
style style
x: (path, root=d.body) -> x: (path, root=d.body) ->
d.evaluate(path, root, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null). # XPathResult.ANY_UNORDERED_NODE_TYPE is 8
d.evaluate(path, root, null, 8, null).
singleNodeValue singleNodeValue
replace: (root, el) -> replace: (root, el) ->
root.parentNode.replaceChild el, root root.parentNode.replaceChild el, root
@ -547,7 +548,7 @@ filter =
return trip.textContent return trip.textContent
false false
email: (root) -> email: (root) ->
unless mail = $ '.linkmail', root if mail = $ '.linkmail', root
return mail.href return mail.href
false false
subject: (root, isOP) -> subject: (root, isOP) ->
@ -555,15 +556,12 @@ filter =
sub.textContent sub.textContent
comment: (root) -> comment: (root) ->
text = [] text = []
nodes = d.evaluate './/node()', root.lastChild, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null # XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE is 7
nodes = d.evaluate './/br|.//text()', root.lastChild, null, 7, null
i = 0 i = 0
len = nodes.snapshotLength len = nodes.snapshotLength
while i < len while i < len
node = nodes.snapshotItem i++ text.push if data = nodes.snapshotItem(i++).data then data else '\n'
if node instanceof Text
text.push node.data
else if node instanceof HTMLBRElement
text.push '\n'
text.join '' text.join ''
filename: (root) -> filename: (root) ->
if file = $ '.filesize > span', root if file = $ '.filesize > span', root
@ -666,7 +664,7 @@ expandThread =
a.textContent = a.textContent.replace '-', '+' a.textContent = a.textContent.replace '-', '+'
#goddamit moot #goddamit moot
num = switch g.BOARD num = switch g.BOARD
when 'b' then 3 when 'b', 'vg' then 3
when 't' then 1 when 't' then 1
else 5 else 5
table = $.x "following::br[@clear]/preceding::table[#{num}]", a table = $.x "following::br[@clear]/preceding::table[#{num}]", a
@ -1231,7 +1229,7 @@ qr =
className: 'preview' className: 'preview'
draggable: true draggable: true
href: 'javascript:;' href: 'javascript:;'
innerHTML: '<a class=remove>x</a><label hidden><input type=checkbox> Spoiler</label><span></span>' innerHTML: '<a class=remove>&times;</a><label hidden><input type=checkbox> Spoiler</label><span></span>'
$('input', @el).checked = @spoiler $('input', @el).checked = @spoiler
$.on @el, 'click', => @select() $.on @el, 'click', => @select()
$.on $('.remove', @el), 'click', (e) => $.on $('.remove', @el), 'click', (e) =>
@ -1368,7 +1366,7 @@ qr =
qr.el = ui.dialog 'qr', 'top:0;right:0;', ' qr.el = ui.dialog 'qr', 'top:0;right:0;', '
<div class=move> <div class=move>
Quick Reply <input type=checkbox id=autohide title=Auto-hide> Quick Reply <input type=checkbox id=autohide title=Auto-hide>
<span> <a class=close title=Close>x</a></span> <span> <a class=close title=Close>&times;</a></span>
</div> </div>
<form> <form>
<div><input id=dump class=field type=button title="Dump list" value=+><input name=name title=Name placeholder=Name class=field size=1><input name=email title=E-mail placeholder=E-mail class=field size=1><input name=sub title=Subject placeholder=Subject class=field size=1></div> <div><input id=dump class=field type=button title="Dump list" value=+><input name=name title=Name placeholder=Name class=field size=1><input name=email title=E-mail placeholder=E-mail class=field size=1><input name=sub title=Subject placeholder=Subject class=field size=1></div>
@ -1716,7 +1714,8 @@ options =
className: 'reply dialog' className: 'reply dialog'
innerHTML: '<div id=optionsbar> innerHTML: '<div id=optionsbar>
<div id=credits> <div id=credits>
<a target=_blank href=http://mayhemydg.github.com/4chan-x/>4chan X</a> | ' + VERSION + ' <a target=_blank href=http://mayhemydg.github.com/4chan-x/>4chan X</a>
| <a target=_blank href=https://raw.github.com/mayhemydg/4chan-x/master/changelog>' + VERSION + '</a>
| <a target=_blank href=http://mayhemydg.github.com/4chan-x/#bug-report>Issues</a> | <a target=_blank href=http://mayhemydg.github.com/4chan-x/#bug-report>Issues</a>
</div> </div>
<div> <div>
@ -2214,7 +2213,8 @@ watcher =
for board of watched for board of watched
for id, props of watched[board] for id, props of watched[board]
x = $.el 'a', x = $.el 'a',
textContent: 'X' # \u00d7 is &times;
textContent: '\u00d7'
href: 'javascript:;' href: 'javascript:;'
$.on x, 'click', watcher.cb.x $.on x, 'click', watcher.cb.x
link = $.el 'a', props link = $.el 'a', props
@ -2710,7 +2710,7 @@ threadStats =
threadStats.posts = threadStats.images = 0 threadStats.posts = threadStats.images = 0
threadStats.imgLimit = threadStats.imgLimit =
switch g.BOARD switch g.BOARD
when 'a', 'v' when 'a', 'mlp', 'v'
251 251
when 'vg' when 'vg'
501 501
@ -2824,7 +2824,7 @@ redirect =
# Do not use g.BOARD, the image url can originate from a cross-quote. # Do not use g.BOARD, the image url can originate from a cross-quote.
return unless conf['404 Redirect'] return unless conf['404 Redirect']
switch href[3] switch href[3]
when 'a', 'jp', 'm', 'tg', 'u' when 'a', 'jp', 'm', 'tg', 'u', 'vg'
"http://archive.foolz.us/#{href[3]}/full_image/#{href[5]}" "http://archive.foolz.us/#{href[3]}/full_image/#{href[5]}"
thread: -> thread: ->
return unless conf['404 Redirect'] return unless conf['404 Redirect']
@ -3441,6 +3441,16 @@ img[md5], img[md5] + img {
.presto > .fitwidth img[md5] + img { .presto > .fitwidth img[md5] + img {
width: 100%; width: 100%;
} }
/* revealed spoilers do not have height/width,
this fixed "expanded" auto-gifs */
img[md5] {
max-height: 251px;
max-width: 251px;
}
td > .filesize > img[md5] {
max-height: 126px;
max-width: 126px;
}
#qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks { #qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks {
position: fixed; position: fixed;