Skip to content

Commit

Permalink
New: Shortcuts for saving images
Browse files Browse the repository at this point in the history
  • Loading branch information
ollm committed Jan 16, 2025
1 parent 4d155ed commit 05c9b31
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Option to save bookmarked images [`7def9ec`](https://github.com/ollm/OpenComic/commit/7def9eca58ceb24fb3444a3daf3ed81178a13fd1)
- Improved opening behavior options for files and folders [`07ee1f5`](https://github.com/ollm/OpenComic/commit/07ee1f5007576016a709e45d4649319129f75911)
- Make the Ignore single folders option work for images too [`cc9f9c7`](https://github.com/ollm/OpenComic/commit/cc9f9c727ec11b1a12fd4c8dac90506f7e01b378)
- Scroll by screen percentage in webtoon mode
- Scroll by screen percentage in webtoon mode [`9a86a30`](https://github.com/ollm/OpenComic/commit/9a86a30ab5e599734503812ff274122bca103ac0)
- Shortcuts for saving images

##### 🐛 Bug Fixes

Expand Down
43 changes: 42 additions & 1 deletion scripts/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,15 @@ function loadShortcuts()
'goForwards',
],
},
{
name: language.global.contextMenu.saveImage,
items: [
'saveImage',
'saveAllImages',
'saveBookmarksImages',
'saveAllBookmarksImages',
],
},
{
name: language.settings.shortcuts.menus,
items: [
Expand Down Expand Up @@ -736,7 +745,38 @@ function loadShortcuts()
return true;
},
},

saveImage: {
name: language.global.contextMenu.saveImage,
function: function(event){
if(inputIsFocused() || !reading.isLoaded()) return false;
reading.contextMenu.saveImage();
return true;
},
},
saveAllImages: {
name: language.global.contextMenu.saveAllImages,
function: function(event){
if(inputIsFocused() || !reading.isLoaded()) return false;
reading.contextMenu.saveAllImages();
return true;
},
},
saveBookmarksImages: {
name: language.global.contextMenu.saveBookmarksImages,
function: function(event){
if(inputIsFocused() || !reading.isLoaded()) return false;
reading.contextMenu.saveBookmarksImages();
return true;
},
},
saveAllBookmarksImages: {
name: language.global.contextMenu.saveAllBookmarksImages,
function: function(event){
if(inputIsFocused() || !reading.isLoaded()) return false;
reading.contextMenu.saveAllBookmarksImages();
return true;
},
},

leftClick: {
name: '',
Expand Down Expand Up @@ -816,6 +856,7 @@ function loadShortcuts()
'Z': 'resetZoom',
'Esc': 'goBack',
'Backspace': 'goBack',
'Ctrl+S': 'saveImage',
'F11': 'fullscreen',
'G': 'gamepadMenu',
},
Expand Down

0 comments on commit 05c9b31

Please sign in to comment.