Skip to content

Commit 05c9b31

Browse files
committed
New: Shortcuts for saving images
1 parent 4d155ed commit 05c9b31

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1313
- Option to save bookmarked images [`7def9ec`](https://github.com/ollm/OpenComic/commit/7def9eca58ceb24fb3444a3daf3ed81178a13fd1)
1414
- Improved opening behavior options for files and folders [`07ee1f5`](https://github.com/ollm/OpenComic/commit/07ee1f5007576016a709e45d4649319129f75911)
1515
- Make the Ignore single folders option work for images too [`cc9f9c7`](https://github.com/ollm/OpenComic/commit/cc9f9c727ec11b1a12fd4c8dac90506f7e01b378)
16-
- Scroll by screen percentage in webtoon mode
16+
- Scroll by screen percentage in webtoon mode [`9a86a30`](https://github.com/ollm/OpenComic/commit/9a86a30ab5e599734503812ff274122bca103ac0)
17+
- Shortcuts for saving images
1718

1819
##### 🐛 Bug Fixes
1920

scripts/shortcuts.js

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,15 @@ function loadShortcuts()
263263
'goForwards',
264264
],
265265
},
266+
{
267+
name: language.global.contextMenu.saveImage,
268+
items: [
269+
'saveImage',
270+
'saveAllImages',
271+
'saveBookmarksImages',
272+
'saveAllBookmarksImages',
273+
],
274+
},
266275
{
267276
name: language.settings.shortcuts.menus,
268277
items: [
@@ -736,7 +745,38 @@ function loadShortcuts()
736745
return true;
737746
},
738747
},
739-
748+
saveImage: {
749+
name: language.global.contextMenu.saveImage,
750+
function: function(event){
751+
if(inputIsFocused() || !reading.isLoaded()) return false;
752+
reading.contextMenu.saveImage();
753+
return true;
754+
},
755+
},
756+
saveAllImages: {
757+
name: language.global.contextMenu.saveAllImages,
758+
function: function(event){
759+
if(inputIsFocused() || !reading.isLoaded()) return false;
760+
reading.contextMenu.saveAllImages();
761+
return true;
762+
},
763+
},
764+
saveBookmarksImages: {
765+
name: language.global.contextMenu.saveBookmarksImages,
766+
function: function(event){
767+
if(inputIsFocused() || !reading.isLoaded()) return false;
768+
reading.contextMenu.saveBookmarksImages();
769+
return true;
770+
},
771+
},
772+
saveAllBookmarksImages: {
773+
name: language.global.contextMenu.saveAllBookmarksImages,
774+
function: function(event){
775+
if(inputIsFocused() || !reading.isLoaded()) return false;
776+
reading.contextMenu.saveAllBookmarksImages();
777+
return true;
778+
},
779+
},
740780

741781
leftClick: {
742782
name: '',
@@ -816,6 +856,7 @@ function loadShortcuts()
816856
'Z': 'resetZoom',
817857
'Esc': 'goBack',
818858
'Backspace': 'goBack',
859+
'Ctrl+S': 'saveImage',
819860
'F11': 'fullscreen',
820861
'G': 'gamepadMenu',
821862
},

0 commit comments

Comments
 (0)