mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
Added new shortcut to open full images 'V'. Changed behavior to open new tab (#68)
Co-authored-by: yoditax@net.com <yoditax@net.com>
This commit is contained in:
parent
0036da2b5e
commit
e45cbc00c8
1 changed files with 2 additions and 1 deletions
|
@ -13,7 +13,7 @@ function openFullView() {
|
|||
const imageHover = $('[data-uris]:hover');
|
||||
if (!imageHover) return;
|
||||
|
||||
window.location = JSON.parse(imageHover.dataset.uris).full;
|
||||
window.open(JSON.parse(imageHover.dataset.uris).full);
|
||||
}
|
||||
|
||||
function click(selector) {
|
||||
|
@ -35,6 +35,7 @@ const keyCodes = {
|
|||
83() { click('.js-source-link'); }, // S - go to image source
|
||||
76() { click('.js-tag-sauce-toggle'); }, // L - edit tags
|
||||
79() { openFullView() }, // O - open original
|
||||
86() { openFullView() }, // V - open original
|
||||
70() { // F - favourite image
|
||||
getHover() ? click(`a.interaction--fave[data-image-id="${getHover()}"]`)
|
||||
: click('.block__header a.interaction--fave');
|
||||
|
|
Loading…
Reference in a new issue