keybind: M - expand all images
This commit is contained in:
parent
f24825c740
commit
516cf60dc2
@ -533,10 +533,13 @@ keypress = (e) ->
|
|||||||
if temp > 15 then temp = 15
|
if temp > 15 then temp = 15
|
||||||
location.pathname = "/#{g.BOARD}/#{temp}#0"
|
location.pathname = "/#{g.BOARD}/#{temp}#0"
|
||||||
when "M"
|
when "M"
|
||||||
[thread] = getThread()
|
if e.shiftKey
|
||||||
unless image = $ 'td.replyhl span.filesize ~ a[target]', thread
|
$("#imageExpand").click()
|
||||||
image = $ 'span.filesize ~ a[target]', thread
|
else
|
||||||
imageToggle image
|
[thread] = getThread()
|
||||||
|
unless image = $ 'td.replyhl span.filesize ~ a[target]', thread
|
||||||
|
image = $ 'span.filesize ~ a[target]', thread
|
||||||
|
imageToggle image
|
||||||
when "O"
|
when "O"
|
||||||
href = $("#{hash} ~ span[id] a:last-of-type").href
|
href = $("#{hash} ~ span[id] a:last-of-type").href
|
||||||
GM_openInTab href
|
GM_openInTab href
|
||||||
@ -986,7 +989,7 @@ recaptcha.addEventListener('keydown', recaptchaListener, true)
|
|||||||
if getConfig 'Image Expansion'
|
if getConfig 'Image Expansion'
|
||||||
delform = $ 'form[name=delform]'
|
delform = $ 'form[name=delform]'
|
||||||
expand = n 'div',
|
expand = n 'div',
|
||||||
innerHTML: "<label>Expand Images<input type=checkbox></label>"
|
innerHTML: "<label>Expand Images<input type=checkbox id=imageExpand></label>"
|
||||||
$("input", expand).addEventListener 'click', imageExpandClick, true
|
$("input", expand).addEventListener 'click', imageExpandClick, true
|
||||||
inBefore delform.firstChild, expand
|
inBefore delform.firstChild, expand
|
||||||
|
|
||||||
|
|||||||
14
4chan_x.js
14
4chan_x.js
@ -697,11 +697,15 @@
|
|||||||
return location.pathname = "/" + g.BOARD + "/" + temp + "#0";
|
return location.pathname = "/" + g.BOARD + "/" + temp + "#0";
|
||||||
break;
|
break;
|
||||||
case "M":
|
case "M":
|
||||||
thread = getThread()[0];
|
if (e.shiftKey) {
|
||||||
if (!(image = $('td.replyhl span.filesize ~ a[target]', thread))) {
|
return $("#imageExpand").click();
|
||||||
image = $('span.filesize ~ a[target]', thread);
|
} else {
|
||||||
|
thread = getThread()[0];
|
||||||
|
if (!(image = $('td.replyhl span.filesize ~ a[target]', thread))) {
|
||||||
|
image = $('span.filesize ~ a[target]', thread);
|
||||||
|
}
|
||||||
|
return imageToggle(image);
|
||||||
}
|
}
|
||||||
return imageToggle(image);
|
|
||||||
break;
|
break;
|
||||||
case "O":
|
case "O":
|
||||||
href = $("" + hash + " ~ span[id] a:last-of-type").href;
|
href = $("" + hash + " ~ span[id] a:last-of-type").href;
|
||||||
@ -1258,7 +1262,7 @@
|
|||||||
if (getConfig('Image Expansion')) {
|
if (getConfig('Image Expansion')) {
|
||||||
delform = $('form[name=delform]');
|
delform = $('form[name=delform]');
|
||||||
expand = n('div', {
|
expand = n('div', {
|
||||||
innerHTML: "<label>Expand Images<input type=checkbox></label>"
|
innerHTML: "<label>Expand Images<input type=checkbox id=imageExpand></label>"
|
||||||
});
|
});
|
||||||
$("input", expand).addEventListener('click', imageExpandClick, true);
|
$("input", expand).addEventListener('click', imageExpandClick, true);
|
||||||
inBefore(delform.firstChild, expand);
|
inBefore(delform.firstChild, expand);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user