Skip to content

Commit

Permalink
Disable right-click copy menu for View Once images
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal committed Apr 18, 2023
1 parent 7db16c4 commit a532cb4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/spell_check.ts
Expand Up @@ -120,6 +120,13 @@ export const setup = (
};
label = i18n('icu:contextMenuCopyLink');
} else if (isImage) {
const urlIsViewOnce =
params.srcURL?.includes('/temp/') ||
params.srcURL?.includes('\\temp\\');
if (urlIsViewOnce) {
return;
}

click = () => {
const parsedSrcUrl = maybeParseUrl(params.srcURL);
if (!parsedSrcUrl || parsedSrcUrl.protocol !== 'file:') {
Expand Down

0 comments on commit a532cb4

Please sign in to comment.