option to refresh by pressing '!'

This commit is contained in:
Chris
2025-02-20 11:58:38 +11:00
parent f788b4e687
commit 4e1f6b579c
2 changed files with 10 additions and 3 deletions
+6
View File
@@ -13,6 +13,12 @@ app.registerExtension({
type: "boolean",
defaultValue: true
},
{
id: "ImageFilter.ReshowWindow",
name: "Pressing '!' reshows the window",
type: "boolean",
defaultValue: true
},
],
setup() {
create('link', null, document.getElementsByTagName('HEAD')[0],
+4 -3
View File
@@ -237,12 +237,13 @@ class Popup extends HTMLSpanElement {
}
on_keypress(e) {
if (e.key=='!') {
if (e.key=='!' && app.ui.settings.getSettingValue("ImageFilter.ReshowWindow") && !this.contains(document.activeElement)) {
this.reshow_window()
return
}
if (!this.active) return
if (this.doing_text) return
if (this.doing_text || !this.active) return
if (e.key=='x') {
e.stopPropagation()
e.preventDefault()