allow pinning on trackpad + respect allowJs
This commit is contained in:
		
							parent
							
								
									b8e6d7fb09
								
							
						
					
					
						commit
						08c70b4dcc
					
				@ -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>
 | 
			
		||||
 | 
			
		||||
@ -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) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user