mv quickReport
This commit is contained in:
parent
8ef673f7ee
commit
741d3224aa
68
4chan_x.js
68
4chan_x.js
@ -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 = {
|
unread = {
|
||||||
init: function() {
|
init: function() {
|
||||||
d.title = '(0) ' + d.title;
|
d.title = '(0) ' + d.title;
|
||||||
@ -1947,40 +1981,6 @@
|
|||||||
}
|
}
|
||||||
return location.href = url;
|
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.';
|
NAMESPACE = 'AEOS.4chan_x.';
|
||||||
g = {
|
g = {
|
||||||
cache: {},
|
cache: {},
|
||||||
|
|||||||
@ -1341,6 +1341,27 @@ imgExpansion =
|
|||||||
$.bind thumb.parentNode, 'click', imageClick
|
$.bind thumb.parentNode, 'click', imageClick
|
||||||
if g.expand then imageToggle thumb.parentNode
|
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 =
|
unread =
|
||||||
init: ->
|
init: ->
|
||||||
d.title = '(0) ' + d.title
|
d.title = '(0) ' + d.title
|
||||||
@ -1495,27 +1516,6 @@ redirect = ->
|
|||||||
url = "http://boards.4chan.org/#{g.BOARD}"
|
url = "http://boards.4chan.org/#{g.BOARD}"
|
||||||
location.href = url
|
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 ***************************************************************
|
# /TODO ***************************************************************
|
||||||
|
|
||||||
#main
|
#main
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user