diff --git a/bbcode/UrlTagView.vue b/bbcode/UrlTagView.vue index af5557c..74dec9f 100644 --- a/bbcode/UrlTagView.vue +++ b/bbcode/UrlTagView.vue @@ -7,7 +7,7 @@ rel="nofollow noreferrer noopener" target="_blank" class="user-link" - @click="handleClick()" + @click="handleClick" @mouseover.prevent="show()" @mouseenter.prevent="show()" @mouseleave.prevent="dismiss()" @@ -66,8 +66,13 @@ EventBus.$emit('imagepreview-toggle-stickyness', {url: this.url}); } - handleClick(): void { - this.dismiss(true); + handleClick(e: MouseEvent): void { + if (e.altKey) { + this.toggleStickyness(); + e.preventDefault(); + } else { + this.dismiss(true); + } } } diff --git a/chat/preview/ImagePreview.vue b/chat/preview/ImagePreview.vue index 5f78229..bc76f8f 100644 --- a/chat/preview/ImagePreview.vue +++ b/chat/preview/ImagePreview.vue @@ -560,6 +560,8 @@ async executeJavaScript(js: string | undefined, context: string = 'unknown', logDetails?: any): Promise { + if (!this.runJs) return; + const webview = this.getWebview(); if (!js) {