mv quickReport

This commit is contained in:
James Campos 2011-04-17 08:43:33 -07:00
parent 8ef673f7ee
commit 741d3224aa
2 changed files with 55 additions and 55 deletions

View File

@ -1724,6 +1724,40 @@
}
}
};
quickReport = {
init: function() {
return g.callbacks.push(quickReport.cb.node);
},
cb: {
node: function(root) {
var a, arr, el, _i, _len, _results;
arr = $$('span[id^=no]', root);
_results = [];
for (_i = 0, _len = arr.length; _i < _len; _i++) {
el = arr[_i];
a = $.el('a', {
textContent: '[ ! ]'
});
$.bind(a, 'click', quickReport.cb.report);
$.after(el, a);
_results.push($.after(el, $.tn(' ')));
}
return _results;
},
report: function(e) {
var target;
target = e.target;
return quickReport.report(target);
}
},
report: function(target) {
var input;
input = $.x('preceding-sibling::input[1]', target);
input.click();
$('input[value="Report"]').click();
return input.click();
}
};
unread = {
init: function() {
d.title = '(0) ' + d.title;
@ -1947,40 +1981,6 @@
}
return location.href = url;
};
quickReport = {
init: function() {
return g.callbacks.push(quickReport.cb.node);
},
cb: {
node: function(root) {
var a, arr, el, _i, _len, _results;
arr = $$('span[id^=no]', root);
_results = [];
for (_i = 0, _len = arr.length; _i < _len; _i++) {
el = arr[_i];
a = $.el('a', {
textContent: '[ ! ]'
});
$.bind(a, 'click', quickReport.cb.report);
$.after(el, a);
_results.push($.after(el, $.tn(' ')));
}
return _results;
},
report: function(e) {
var target;
target = e.target;
return quickReport.report(target);
}
},
report: function(target) {
var input;
input = $.x('preceding-sibling::input[1]', target);
input.click();
$('input[value="Report"]').click();
return input.click();
}
};
NAMESPACE = 'AEOS.4chan_x.';
g = {
cache: {},

View File

@ -1341,6 +1341,27 @@ imgExpansion =
$.bind thumb.parentNode, 'click', imageClick
if g.expand then imageToggle thumb.parentNode
quickReport =
init: ->
g.callbacks.push quickReport.cb.node
cb:
node: (root) ->
arr = $$ 'span[id^=no]', root
for el in arr
a = $.el 'a',
textContent: '[ ! ]'
$.bind a, 'click', quickReport.cb.report
$.after el, a
$.after el, $.tn(' ')
report: (e) ->
{target} = e
quickReport.report target
report: (target) ->
input = $.x('preceding-sibling::input[1]', target)
input.click()
$('input[value="Report"]').click()
input.click()
unread =
init: ->
d.title = '(0) ' + d.title
@ -1495,27 +1516,6 @@ redirect = ->
url = "http://boards.4chan.org/#{g.BOARD}"
location.href = url
quickReport =
init: ->
g.callbacks.push quickReport.cb.node
cb:
node: (root) ->
arr = $$ 'span[id^=no]', root
for el in arr
a = $.el 'a',
textContent: '[ ! ]'
$.bind a, 'click', quickReport.cb.report
$.after el, a
$.after el, $.tn(' ')
report: (e) ->
{target} = e
quickReport.report target
report: (target) ->
input = $.x('preceding-sibling::input[1]', target)
input.click()
$('input[value="Report"]').click()
input.click()
# /TODO ***************************************************************
#main