Remove unnecessary (e)s.

This commit is contained in:
Nicolas Stepien 2011-10-18 18:03:46 +02:00
parent d131621b9e
commit b3c4dc3d8b
2 changed files with 36 additions and 36 deletions

View File

@ -275,7 +275,7 @@
return style.right = clientWidth - clientX + 45; return style.right = clientWidth - clientX + 45;
} }
}, },
hoverend: function(e) { hoverend: function() {
return ui.el.parentNode.removeChild(ui.el); return ui.el.parentNode.removeChild(ui.el);
} }
}; };
@ -689,7 +689,7 @@
return _results; return _results;
}, },
cb: { cb: {
toggle: function(e) { toggle: function() {
var thread; var thread;
thread = this.parentNode; thread = this.parentNode;
return expandThread.toggle(thread); return expandThread.toggle(thread);
@ -799,12 +799,12 @@
}); });
}, },
cb: { cb: {
hide: function(e) { hide: function() {
var reply; var reply;
reply = this.parentNode.nextSibling; reply = this.parentNode.nextSibling;
return replyHiding.hide(reply); return replyHiding.hide(reply);
}, },
show: function(e) { show: function() {
var div, table; var div, table;
div = this.parentNode; div = this.parentNode;
table = div.nextSibling; table = div.nextSibling;
@ -1360,7 +1360,7 @@
options.time.call(time); options.time.call(time);
return options.backlink.call(back); return options.backlink.call(back);
}, },
clearHidden: function(e) { clearHidden: function() {
$["delete"]("hiddenReplies/" + g.BOARD + "/"); $["delete"]("hiddenReplies/" + g.BOARD + "/");
$["delete"]("hiddenThreads/" + g.BOARD + "/"); $["delete"]("hiddenThreads/" + g.BOARD + "/");
this.textContent = "hidden: 0"; this.textContent = "hidden: 0";
@ -1376,14 +1376,14 @@
$.set(this.name, key); $.set(this.name, key);
return conf[this.name] = key; return conf[this.name] = key;
}, },
time: function(e) { time: function() {
$.set('time', this.value); $.set('time', this.value);
conf['time'] = this.value; conf['time'] = this.value;
Time.foo(); Time.foo();
Time.date = new Date(); Time.date = new Date();
return $('#timePreview').textContent = Time.funk(Time); return $('#timePreview').textContent = Time.funk(Time);
}, },
backlink: function(e) { backlink: function() {
$.set('backlink', this.value); $.set('backlink', this.value);
conf['backlink'] = this.value; conf['backlink'] = this.value;
return $('#backlinkPreview').textContent = conf['backlink'].replace(/%id/, '123456789'); return $('#backlinkPreview').textContent = conf['backlink'].replace(/%id/, '123456789');
@ -1827,12 +1827,12 @@
return _results; return _results;
}, },
cb: { cb: {
hide: function(e) { hide: function() {
var thread; var thread;
thread = this.parentNode.parentNode; thread = this.parentNode.parentNode;
return threadHiding.hide(thread); return threadHiding.hide(thread);
}, },
show: function(e) { show: function() {
var thread; var thread;
thread = this.parentNode.parentNode; thread = this.parentNode.parentNode;
return threadHiding.show(thread); return threadHiding.show(thread);
@ -2099,10 +2099,10 @@
return _results; return _results;
}, },
cb: { cb: {
toggle: function(e) { toggle: function() {
return watcher.toggle(this.parentNode); return watcher.toggle(this.parentNode);
}, },
x: function(e) { x: function() {
var board, id, _, _ref; var board, id, _, _ref;
_ref = this.nextElementSibling.getAttribute('href').substring(1).split('/'), board = _ref[0], _ = _ref[1], id = _ref[2]; _ref = this.nextElementSibling.getAttribute('href').substring(1).split('/'), board = _ref[0], _ = _ref[1], id = _ref[2];
return watcher.unwatch(board, id); return watcher.unwatch(board, id);
@ -2664,7 +2664,7 @@
return Favicon.update(); return Favicon.update();
} }
}, },
scroll: function(e) { scroll: function() {
var bottom, height, i, reply, _len, _ref; var bottom, height, i, reply, _len, _ref;
updater.focus = true; updater.focus = true;
height = d.body.clientHeight; height = d.body.clientHeight;
@ -2769,7 +2769,7 @@
return $.bind(thumb, 'mouseout', ui.hoverend); return $.bind(thumb, 'mouseout', ui.hoverend);
}); });
}, },
mouseover: function(e) { mouseover: function() {
ui.el = $.el('img', { ui.el = $.el('img', {
id: 'iHover', id: 'iHover',
src: this.parentNode.href src: this.parentNode.href
@ -2832,7 +2832,7 @@
e.preventDefault(); e.preventDefault();
return imgExpand.toggle(this); return imgExpand.toggle(this);
}, },
all: function(e) { all: function() {
var thumb, _i, _j, _len, _len2, _ref, _ref2, _results, _results2; var thumb, _i, _j, _len, _len2, _ref, _ref2, _results, _results2;
imgExpand.on = this.checked; imgExpand.on = this.checked;
if (imgExpand.on) { if (imgExpand.on) {
@ -2853,7 +2853,7 @@
return _results2; return _results2;
} }
}, },
typeChange: function(e) { typeChange: function() {
var klass; var klass;
switch (this.value) { switch (this.value) {
case 'full': case 'full':
@ -2899,13 +2899,13 @@
thumb.hidden = true; thumb.hidden = true;
return $.add(a, img); return $.add(a, img);
}, },
error: function(e) { error: function() {
var req, thumb; var req, thumb;
thumb = this.previousSibling; thumb = this.previousSibling;
imgExpand.contract(thumb); imgExpand.contract(thumb);
if (navigator.appName !== 'Opera') { if (navigator.appName !== 'Opera') {
req = $.ajax(this.src, null, 'head'); req = $.ajax(this.src, null, 'head');
return req.onreadystatechange = function(e) { return req.onreadystatechange = function() {
if (this.status !== 404) { if (this.status !== 404) {
return setTimeout(imgExpand.retry, 10000, thumb); return setTimeout(imgExpand.retry, 10000, thumb);
} }
@ -2942,7 +2942,7 @@
delform = $('form[name=delform]'); delform = $('form[name=delform]');
return $.prepend(delform, controls); return $.prepend(delform, controls);
}, },
resize: function(e) { resize: function() {
return imgExpand.style.innerHTML = ".fitheight img[md5] + img {max-height:" + d.body.clientHeight + "px;}"; return imgExpand.style.innerHTML = ".fitheight img[md5] + img {max-height:" + d.body.clientHeight + "px;}";
} }
}; };

View File

@ -197,7 +197,7 @@ ui =
style.left = null style.left = null
style.right = clientWidth - clientX + 45 style.right = clientWidth - clientX + 45
hoverend: (e) -> hoverend: ->
ui.el.parentNode.removeChild ui.el ui.el.parentNode.removeChild ui.el
### ###
@ -486,7 +486,7 @@ expandThread =
$.replace span, a $.replace span, a
cb: cb:
toggle: (e) -> toggle: ->
thread = @parentNode thread = @parentNode
expandThread.toggle thread expandThread.toggle thread
@ -566,11 +566,11 @@ replyHiding =
replyHiding.hide reply replyHiding.hide reply
cb: cb:
hide: (e) -> hide: ->
reply = @parentNode.nextSibling reply = @parentNode.nextSibling
replyHiding.hide reply replyHiding.hide reply
show: (e) -> show: ->
div = @parentNode div = @parentNode
table = div.nextSibling table = div.nextSibling
replyHiding.show table replyHiding.show table
@ -994,7 +994,7 @@ options =
options.time.call time options.time.call time
options.backlink.call back options.backlink.call back
clearHidden: (e) -> clearHidden: ->
#'hidden' might be misleading; it's the number of IDs we're *looking* for, #'hidden' might be misleading; it's the number of IDs we're *looking* for,
# not the number of posts actually hidden on the page. # not the number of posts actually hidden on the page.
$.delete "hiddenReplies/#{g.BOARD}/" $.delete "hiddenReplies/#{g.BOARD}/"
@ -1008,13 +1008,13 @@ options =
@value = key @value = key
$.set @name, key $.set @name, key
conf[@name] = key conf[@name] = key
time: (e) -> time: ->
$.set 'time', @value $.set 'time', @value
conf['time'] = @value conf['time'] = @value
Time.foo() Time.foo()
Time.date = new Date() Time.date = new Date()
$('#timePreview').textContent = Time.funk Time $('#timePreview').textContent = Time.funk Time
backlink: (e) -> backlink: ->
$.set 'backlink', @value $.set 'backlink', @value
conf['backlink'] = @value conf['backlink'] = @value
$('#backlinkPreview').textContent = conf['backlink'].replace /%id/, '123456789' $('#backlinkPreview').textContent = conf['backlink'].replace /%id/, '123456789'
@ -1367,10 +1367,10 @@ threadHiding =
threadHiding.hideHide thread threadHiding.hideHide thread
cb: cb:
hide: (e) -> hide: ->
thread = @parentNode.parentNode thread = @parentNode.parentNode
threadHiding.hide thread threadHiding.hide thread
show: (e) -> show: ->
thread = @parentNode.parentNode thread = @parentNode.parentNode
threadHiding.show thread threadHiding.show thread
@ -1596,9 +1596,9 @@ watcher =
favicon.src = Favicon.empty favicon.src = Favicon.empty
cb: cb:
toggle: (e) -> toggle: ->
watcher.toggle @parentNode watcher.toggle @parentNode
x: (e) -> x: ->
[board, _, id] = @nextElementSibling [board, _, id] = @nextElementSibling
.getAttribute('href').substring(1).split('/') .getAttribute('href').substring(1).split('/')
watcher.unwatch board, id watcher.unwatch board, id
@ -1971,7 +1971,7 @@ unread =
if unread.replies.length is 1 if unread.replies.length is 1
Favicon.update() Favicon.update()
scroll: (e) -> scroll: ->
updater.focus = true updater.focus = true
height = d.body.clientHeight height = d.body.clientHeight
for reply, i in unread.replies for reply, i in unread.replies
@ -2043,7 +2043,7 @@ imgHover =
$.bind thumb, 'mouseover', imgHover.mouseover $.bind thumb, 'mouseover', imgHover.mouseover
$.bind thumb, 'mousemove', ui.hover $.bind thumb, 'mousemove', ui.hover
$.bind thumb, 'mouseout', ui.hoverend $.bind thumb, 'mouseout', ui.hoverend
mouseover: (e) -> mouseover: ->
ui.el = $.el 'img' ui.el = $.el 'img'
id: 'iHover' id: 'iHover'
src: @parentNode.href src: @parentNode.href
@ -2082,7 +2082,7 @@ imgExpand =
return if e.shiftKey or e.altKey or e.ctrlKey or e.button isnt 0 return if e.shiftKey or e.altKey or e.ctrlKey or e.button isnt 0
e.preventDefault() e.preventDefault()
imgExpand.toggle @ imgExpand.toggle @
all: (e) -> all: ->
imgExpand.on = @checked imgExpand.on = @checked
if imgExpand.on #expand if imgExpand.on #expand
for thumb in $$ 'img[md5]:not([hidden])' for thumb in $$ 'img[md5]:not([hidden])'
@ -2090,7 +2090,7 @@ imgExpand =
else #contract else #contract
for thumb in $$ 'img[md5][hidden]' for thumb in $$ 'img[md5][hidden]'
imgExpand.contract thumb imgExpand.contract thumb
typeChange: (e) -> typeChange: ->
switch @value switch @value
when 'full' when 'full'
klass = '' klass = ''
@ -2125,13 +2125,13 @@ imgExpand =
thumb.hidden = true thumb.hidden = true
$.add a, img $.add a, img
error: (e) -> error: ->
thumb = @previousSibling thumb = @previousSibling
imgExpand.contract thumb imgExpand.contract thumb
#navigator.online is not x-browser/os yet #navigator.online is not x-browser/os yet
if navigator.appName isnt 'Opera' if navigator.appName isnt 'Opera'
req = $.ajax @src, null, 'head' req = $.ajax @src, null, 'head'
req.onreadystatechange = (e) -> setTimeout imgExpand.retry, 10000, thumb if @status isnt 404 req.onreadystatechange = -> setTimeout imgExpand.retry, 10000, thumb if @status isnt 404
else unless g.dead else unless g.dead
setTimeout imgExpand.retry, 10000, thumb setTimeout imgExpand.retry, 10000, thumb
retry: (thumb) -> retry: (thumb) ->
@ -2157,7 +2157,7 @@ imgExpand =
delform = $ 'form[name=delform]' delform = $ 'form[name=delform]'
$.prepend delform, controls $.prepend delform, controls
resize: (e) -> resize: ->
imgExpand.style.innerHTML = ".fitheight img[md5] + img {max-height:#{d.body.clientHeight}px;}" imgExpand.style.innerHTML = ".fitheight img[md5] + img {max-height:#{d.body.clientHeight}px;}"
firstRun = firstRun =