Back to request board
1

Image Context: allow non GM users showing images to themselves

Open
Image Context
February 4, 2023

Description

Image Context: allow non GM users showing images to themselves. This is very easy to implement, I'd submit a PR if I could, all you have to do is in config.js line 16 move this line to line 14 - before isGM check $(document).on("contextmenu", "img", ImageContext.onContextMenu); in main.js replace return of method getButtons line 112 with a conditional return return game.user.isGM ? [ { name: "Show", icon: '<i class="fas fa-eye"></i>', callback: ImageContext.show, }, { name: "Send to Chat", icon: '<i class="fas fa-share"></i>', callback: ImageContext.toChat, }, { name: "Copy URL", icon: '<i class="fas fa-link"></i>', callback: ImageContext.copyURL, }, ] : [{ name: "Show", icon: '<i class="fas fa-eye"></i>', callback: ImageContext.show, }]; This automatically only shows the image to player without allowing them to show the image to other players nor to send it to chat/show link This should be refactored not to repeat the Show clause