Fix 4chan X on /f/. Small optimizations while I'm at it. Close #129
This commit is contained in:
parent
0dce1dd7a9
commit
047f056c4c
@ -2276,9 +2276,9 @@
|
|||||||
return g.callbacks.push(Time.node);
|
return g.callbacks.push(Time.node);
|
||||||
},
|
},
|
||||||
node: function(root) {
|
node: function(root) {
|
||||||
var node, posttime, time;
|
var node, time;
|
||||||
if (root.className === 'inline') return;
|
if (root.className === 'inline') return;
|
||||||
node = (posttime = $('.posttime', root)) ? posttime : $('span[id]', root).previousSibling;
|
node = $('.posttime', root) || $('span[id]', root).previousSibling;
|
||||||
Time.date = Time.parse(node);
|
Time.date = Time.parse(node);
|
||||||
time = $.el('time', {
|
time = $.el('time', {
|
||||||
textContent: ' ' + Time.funk(Time) + ' '
|
textContent: ' ' + Time.funk(Time) + ' '
|
||||||
@ -3165,7 +3165,8 @@
|
|||||||
if (conf['Comment Expansion']) expandComment.init();
|
if (conf['Comment Expansion']) expandComment.init();
|
||||||
if (conf['Index Navigation']) nav.init();
|
if (conf['Index Navigation']) nav.init();
|
||||||
}
|
}
|
||||||
nodes = $$('.op, a + table');
|
form = $('body > form');
|
||||||
|
nodes = $$('.op, a + table', form);
|
||||||
_ref = g.callbacks;
|
_ref = g.callbacks;
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
callback = _ref[_i];
|
callback = _ref[_i];
|
||||||
@ -3178,7 +3179,7 @@
|
|||||||
alert(err);
|
alert(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $.on($('form[name=delform]'), 'DOMNodeInserted', Main.node);
|
return $.on(form, 'DOMNodeInserted', Main.node);
|
||||||
},
|
},
|
||||||
message: function(e) {
|
message: function(e) {
|
||||||
var data, origin;
|
var data, origin;
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
master
|
master
|
||||||
|
- Mayhem
|
||||||
|
Fix 4chan X on /f/.
|
||||||
|
|
||||||
2.24.5
|
2.24.5
|
||||||
- Mayhem
|
- Mayhem
|
||||||
|
|||||||
@ -1824,7 +1824,7 @@ Time =
|
|||||||
g.callbacks.push Time.node
|
g.callbacks.push Time.node
|
||||||
node: (root) ->
|
node: (root) ->
|
||||||
return if root.className is 'inline'
|
return if root.className is 'inline'
|
||||||
node = if posttime = $('.posttime', root) then posttime else $('span[id]', root).previousSibling
|
node = $('.posttime', root) or $('span[id]', root).previousSibling
|
||||||
Time.date = Time.parse node
|
Time.date = Time.parse node
|
||||||
time = $.el 'time',
|
time = $.el 'time',
|
||||||
textContent: ' ' + Time.funk(Time) + ' '
|
textContent: ' ' + Time.funk(Time) + ' '
|
||||||
@ -2532,14 +2532,15 @@ Main =
|
|||||||
nav.init()
|
nav.init()
|
||||||
|
|
||||||
|
|
||||||
nodes = $$ '.op, a + table'
|
form = $ 'body > form'
|
||||||
|
nodes = $$ '.op, a + table', form
|
||||||
for callback in g.callbacks
|
for callback in g.callbacks
|
||||||
try
|
try
|
||||||
for node in nodes
|
for node in nodes
|
||||||
callback node
|
callback node
|
||||||
catch err
|
catch err
|
||||||
alert err
|
alert err
|
||||||
$.on $('form[name=delform]'), 'DOMNodeInserted', Main.node
|
$.on form, 'DOMNodeInserted', Main.node
|
||||||
|
|
||||||
message: (e) ->
|
message: (e) ->
|
||||||
{origin, data} = e
|
{origin, data} = e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user