get rid of some xpath
This commit is contained in:
parent
4e9165b3f9
commit
c4ce771a9f
@ -1962,7 +1962,7 @@
|
|||||||
},
|
},
|
||||||
report: function(target) {
|
report: function(target) {
|
||||||
var input;
|
var input;
|
||||||
input = $.x('preceding-sibling::input[1]', target);
|
input = $('input', target.parentNode);
|
||||||
input.click();
|
input.click();
|
||||||
$('input[value="Report"]').click();
|
$('input[value="Report"]').click();
|
||||||
return input.click();
|
return input.click();
|
||||||
@ -2294,7 +2294,7 @@
|
|||||||
src: a.href
|
src: a.href
|
||||||
});
|
});
|
||||||
if (a.parentNode.className !== 'op') {
|
if (a.parentNode.className !== 'op') {
|
||||||
filesize = $.x('preceding::span[@class="filesize"][1]', a);
|
filesize = $('span.filesize', a.parentNode);
|
||||||
_ref2 = filesize.textContent.match(/(\d+)x/), _ = _ref2[0], max = _ref2[1];
|
_ref2 = filesize.textContent.match(/(\d+)x/), _ = _ref2[0], max = _ref2[1];
|
||||||
img.setAttribute('style', "max-width: -moz-calc(" + max + "px);");
|
img.setAttribute('style', "max-width: -moz-calc(" + max + "px);");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1540,7 +1540,7 @@ reportButton =
|
|||||||
report: (e) ->
|
report: (e) ->
|
||||||
reportButton.report @
|
reportButton.report @
|
||||||
report: (target) ->
|
report: (target) ->
|
||||||
input = $.x('preceding-sibling::input[1]', target)
|
input = $ 'input', target.parentNode
|
||||||
input.click()
|
input.click()
|
||||||
$('input[value="Report"]').click()
|
$('input[value="Report"]').click()
|
||||||
input.click()
|
input.click()
|
||||||
@ -1749,7 +1749,7 @@ imgExpand =
|
|||||||
img = $.el 'img',
|
img = $.el 'img',
|
||||||
src: a.href
|
src: a.href
|
||||||
unless a.parentNode.className is 'op'
|
unless a.parentNode.className is 'op'
|
||||||
filesize = $.x 'preceding::span[@class="filesize"][1]', a
|
filesize = $ 'span.filesize', a.parentNode
|
||||||
[_, max] = filesize.textContent.match /(\d+)x/
|
[_, max] = filesize.textContent.match /(\d+)x/
|
||||||
img.setAttribute 'style', "max-width: -moz-calc(#{max}px);"
|
img.setAttribute 'style', "max-width: -moz-calc(#{max}px);"
|
||||||
a.appendChild img
|
a.appendChild img
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user