allow pinning on trackpad + respect allowJs

This commit is contained in:
buttercheezii 2021-12-06 06:08:17 -08:00
parent b8e6d7fb09
commit 08c70b4dcc
2 changed files with 10 additions and 3 deletions

View File

@ -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);
}
}
}
</script>

View File

@ -560,6 +560,8 @@
async executeJavaScript(js: string | undefined, context: string = 'unknown', logDetails?: any): Promise<any> {
if (!this.runJs) return;
const webview = this.getWebview();
if (!js) {