rm $.show, $.hide
This commit is contained in:
parent
15ad125124
commit
b8abb2b16d
@ -375,12 +375,6 @@
|
|||||||
replace: function(root, el) {
|
replace: function(root, el) {
|
||||||
return root.parentNode.replaceChild(el, root);
|
return root.parentNode.replaceChild(el, root);
|
||||||
},
|
},
|
||||||
hide: function(el) {
|
|
||||||
return el.hidden = true;
|
|
||||||
},
|
|
||||||
show: function(el) {
|
|
||||||
return el.hidden = false;
|
|
||||||
},
|
|
||||||
addClass: function(el, className) {
|
addClass: function(el, className) {
|
||||||
return el.classList.add(className);
|
return el.classList.add(className);
|
||||||
},
|
},
|
||||||
@ -728,7 +722,7 @@
|
|||||||
hide: function(reply) {
|
hide: function(reply) {
|
||||||
var a, div, id, name, table, trip, _ref;
|
var a, div, id, name, table, trip, _ref;
|
||||||
table = reply.parentNode.parentNode.parentNode;
|
table = reply.parentNode.parentNode.parentNode;
|
||||||
$.hide(table);
|
table.hidden = true;
|
||||||
if (conf['Show Stubs']) {
|
if (conf['Show Stubs']) {
|
||||||
name = $('span.commentpostername', reply).textContent;
|
name = $('span.commentpostername', reply).textContent;
|
||||||
trip = ((_ref = $('span.postertrip', reply)) != null ? _ref.textContent : void 0) || '';
|
trip = ((_ref = $('span.postertrip', reply)) != null ? _ref.textContent : void 0) || '';
|
||||||
@ -748,7 +742,7 @@
|
|||||||
},
|
},
|
||||||
show: function(table) {
|
show: function(table) {
|
||||||
var id;
|
var id;
|
||||||
$.show(table);
|
table.hidden = false;
|
||||||
id = $('td[id]', table).id;
|
id = $('td[id]', table).id;
|
||||||
delete g.hiddenReplies[id];
|
delete g.hiddenReplies[id];
|
||||||
return $.set("hiddenReplies/" + g.BOARD + "/", g.hiddenReplies);
|
return $.set("hiddenReplies/" + g.BOARD + "/", g.hiddenReplies);
|
||||||
@ -1658,16 +1652,16 @@
|
|||||||
$.append(thread, div);
|
$.append(thread, div);
|
||||||
return $.addClass(thread, 'stub');
|
return $.addClass(thread, 'stub');
|
||||||
} else {
|
} else {
|
||||||
$.hide(thread);
|
thread.hidden = true;
|
||||||
return $.hide(thread.nextSibling);
|
return thread.nextSibling.hidden = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show: function(thread) {
|
show: function(thread) {
|
||||||
var hiddenThreads, id;
|
var hiddenThreads, id;
|
||||||
$.rm($('div.block', thread));
|
$.rm($('div.block', thread));
|
||||||
$.removeClass(thread, 'stub');
|
$.removeClass(thread, 'stub');
|
||||||
$.show(thread);
|
thread.hidden = false;
|
||||||
$.show(thread.nextSibling);
|
thread.nextSibling.hidden = false;
|
||||||
id = thread.firstChild.id;
|
id = thread.firstChild.id;
|
||||||
hiddenThreads = $.get("hiddenThreads/" + g.BOARD + "/", {});
|
hiddenThreads = $.get("hiddenThreads/" + g.BOARD + "/", {});
|
||||||
delete hiddenThreads[id];
|
delete hiddenThreads[id];
|
||||||
@ -1735,13 +1729,13 @@
|
|||||||
verbose: function() {
|
verbose: function() {
|
||||||
if (conf['Verbose']) {
|
if (conf['Verbose']) {
|
||||||
updater.count.textContent = '+0';
|
updater.count.textContent = '+0';
|
||||||
return $.show(updater.timer);
|
return updater.timer.hidden = false;
|
||||||
} else {
|
} else {
|
||||||
$.extend(updater.count, {
|
$.extend(updater.count, {
|
||||||
className: '',
|
className: '',
|
||||||
textContent: 'Thread Updater'
|
textContent: 'Thread Updater'
|
||||||
});
|
});
|
||||||
return $.hide(updater.timer);
|
return updater.timer.hidden = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
autoUpdate: function() {
|
autoUpdate: function() {
|
||||||
@ -2208,7 +2202,7 @@
|
|||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
inlined = _ref[_i];
|
inlined = _ref[_i];
|
||||||
if (hidden = $.id(inlined.name)) {
|
if (hidden = $.id(inlined.name)) {
|
||||||
$.show($.x('ancestor::table[1]', hidden));
|
$.x('ancestor::table[1]', hidden).hidden = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -2221,7 +2215,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.after(this.parentNode, inline);
|
$.after(this.parentNode, inline);
|
||||||
$.hide($.x('ancestor::table[1]', el));
|
$.x('ancestor::table[1]', el).hidden = true;
|
||||||
} else {
|
} else {
|
||||||
$.after(root, inline);
|
$.after(root, inline);
|
||||||
}
|
}
|
||||||
@ -2713,12 +2707,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
contract: function(thumb) {
|
contract: function(thumb) {
|
||||||
$.show(thumb);
|
thumb.hidden = false;
|
||||||
return $.rm(thumb.nextSibling);
|
return $.rm(thumb.nextSibling);
|
||||||
},
|
},
|
||||||
expand: function(thumb) {
|
expand: function(thumb) {
|
||||||
var a, filesize, img, max, _, _ref2;
|
var a, filesize, img, max, _, _ref2;
|
||||||
$.hide(thumb);
|
thumb.hidden = true;
|
||||||
a = thumb.parentNode;
|
a = thumb.parentNode;
|
||||||
img = $.el('img', {
|
img = $.el('img', {
|
||||||
src: a.href
|
src: a.href
|
||||||
|
|||||||
@ -254,10 +254,6 @@ $.extend $,
|
|||||||
d.createTextNode s
|
d.createTextNode s
|
||||||
replace: (root, el) ->
|
replace: (root, el) ->
|
||||||
root.parentNode.replaceChild el, root
|
root.parentNode.replaceChild el, root
|
||||||
hide: (el) ->
|
|
||||||
el.hidden = true
|
|
||||||
show: (el) ->
|
|
||||||
el.hidden = false
|
|
||||||
addClass: (el, className) ->
|
addClass: (el, className) ->
|
||||||
el.classList.add className
|
el.classList.add className
|
||||||
removeClass: (el, className) ->
|
removeClass: (el, className) ->
|
||||||
@ -517,7 +513,7 @@ replyHiding =
|
|||||||
|
|
||||||
hide: (reply) ->
|
hide: (reply) ->
|
||||||
table = reply.parentNode.parentNode.parentNode
|
table = reply.parentNode.parentNode.parentNode
|
||||||
$.hide table
|
table.hidden = true
|
||||||
|
|
||||||
if conf['Show Stubs']
|
if conf['Show Stubs']
|
||||||
name = $('span.commentpostername', reply).textContent
|
name = $('span.commentpostername', reply).textContent
|
||||||
@ -536,7 +532,7 @@ replyHiding =
|
|||||||
$.set "hiddenReplies/#{g.BOARD}/", g.hiddenReplies
|
$.set "hiddenReplies/#{g.BOARD}/", g.hiddenReplies
|
||||||
|
|
||||||
show: (table) ->
|
show: (table) ->
|
||||||
$.show table
|
table.hidden = false
|
||||||
|
|
||||||
id = $('td[id]', table).id
|
id = $('td[id]', table).id
|
||||||
delete g.hiddenReplies[id]
|
delete g.hiddenReplies[id]
|
||||||
@ -1354,14 +1350,14 @@ threadHiding =
|
|||||||
$.append thread, div
|
$.append thread, div
|
||||||
$.addClass thread, 'stub'
|
$.addClass thread, 'stub'
|
||||||
else
|
else
|
||||||
$.hide thread
|
thread.hidden = true
|
||||||
$.hide thread.nextSibling
|
thread.nextSibling.hidden = true
|
||||||
|
|
||||||
show: (thread) ->
|
show: (thread) ->
|
||||||
$.rm $ 'div.block', thread
|
$.rm $ 'div.block', thread
|
||||||
$.removeClass thread, 'stub'
|
$.removeClass thread, 'stub'
|
||||||
$.show thread
|
thread.hidden = false
|
||||||
$.show thread.nextSibling
|
thread.nextSibling.hidden = false
|
||||||
|
|
||||||
id = thread.firstChild.id
|
id = thread.firstChild.id
|
||||||
|
|
||||||
@ -1418,12 +1414,12 @@ updater =
|
|||||||
verbose: ->
|
verbose: ->
|
||||||
if conf['Verbose']
|
if conf['Verbose']
|
||||||
updater.count.textContent = '+0'
|
updater.count.textContent = '+0'
|
||||||
$.show updater.timer
|
updater.timer.hidden = false
|
||||||
else
|
else
|
||||||
$.extend updater.count,
|
$.extend updater.count,
|
||||||
className: ''
|
className: ''
|
||||||
textContent: 'Thread Updater'
|
textContent: 'Thread Updater'
|
||||||
$.hide updater.timer
|
updater.timer.hidden = true
|
||||||
autoUpdate: ->
|
autoUpdate: ->
|
||||||
if @checked
|
if @checked
|
||||||
updater.timeoutID = setTimeout updater.timeout, 1000
|
updater.timeoutID = setTimeout updater.timeout, 1000
|
||||||
@ -1741,7 +1737,7 @@ quoteInline =
|
|||||||
$.removeClass @, 'inlined'
|
$.removeClass @, 'inlined'
|
||||||
for inlined in $$ 'input', table
|
for inlined in $$ 'input', table
|
||||||
if hidden = $.id inlined.name
|
if hidden = $.id inlined.name
|
||||||
$.show $.x 'ancestor::table[1]', hidden
|
$.x('ancestor::table[1]', hidden).hidden = false
|
||||||
return
|
return
|
||||||
root = if @parentNode.nodeName is 'FONT' then @parentNode else if @nextSibling then @nextSibling else @
|
root = if @parentNode.nodeName is 'FONT' then @parentNode else if @nextSibling then @nextSibling else @
|
||||||
if el = $.id id
|
if el = $.id id
|
||||||
@ -1749,7 +1745,7 @@ quoteInline =
|
|||||||
if @className is 'backlink'
|
if @className is 'backlink'
|
||||||
return if $("a.backlink[href='##{id}']", el)
|
return if $("a.backlink[href='##{id}']", el)
|
||||||
$.after @parentNode, inline
|
$.after @parentNode, inline
|
||||||
$.hide $.x 'ancestor::table[1]', el
|
$.x('ancestor::table[1]', el).hidden = true
|
||||||
else
|
else
|
||||||
$.after root, inline
|
$.after root, inline
|
||||||
else
|
else
|
||||||
@ -2056,11 +2052,11 @@ imgExpand =
|
|||||||
imgExpand.expand thumb
|
imgExpand.expand thumb
|
||||||
|
|
||||||
contract: (thumb) ->
|
contract: (thumb) ->
|
||||||
$.show thumb
|
thumb.hidden = false
|
||||||
$.rm thumb.nextSibling
|
$.rm thumb.nextSibling
|
||||||
|
|
||||||
expand: (thumb) ->
|
expand: (thumb) ->
|
||||||
$.hide thumb
|
thumb.hidden = true
|
||||||
a = thumb.parentNode
|
a = thumb.parentNode
|
||||||
img = $.el 'img',
|
img = $.el 'img',
|
||||||
src: a.href
|
src: a.href
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user