π Hello! I'm a game developer with interests in Dungeons & Dragons, Touhou Project, C++, and music for the Mega Drive.
π Check my website at kasha.dev
Allows you to use the standard context menu in places where Foundry does not use right-click.
Home Page: https://raw.githubusercontent.com/relick/FoundryVTT-Right-Click-Enabler/master/module.json
License: GNU General Public License v3.0
π Hello! I'm a game developer with interests in Dungeons & Dragons, Touhou Project, C++, and music for the Mega Drive.
π Check my website at kasha.dev
Hello,
It has come to my attention that since 0.8.9 this module breaks libWrapper
, as well as some modules that hook a function in Game
. A quick investigation shows that this is caused by the fact that you replace the entirety of the Game
class with a patched toString()
version.
The problem here is that the toString()
version of a method/class is not guaranteed to correspond to the actual code, especially if any method has been patched by another module. For example, variables that are from scopes outside the class (e.g. specific to a given method) will not be accessible. Methods might rely on native code and thus contain [native]
blocks, etc. Using it for a single method is already an issue sometimes, but using it for an entire class - especially one modified by many modules - is a really bad idea if you want to have good compatibility with other modules.
In this case, libWrapper will patch Game.prototype.initialize
to complete its initialisation, but this patch is thrown out when you replace the Game
class, causing libWrapper to never fully initialise. This used to work before 0.8.9 as libWrapper would load after your module, but in 0.8.9 the module loading order changed, and now your module loads after.
Some other modules that patch Game
also lose their patches and stop working correctly, but neither fails as obviously as libWrapper.
Given you want to remove the line document.addEventListener("contextmenu", ev => ev.preventDefault());
in method Game.prototype.activateListeners
, you could achieve the exact same result without being a nightmare for module compatibility, by restricting your patch to the activateListeners
method itself, e.g.:
const fnStr = Game.prototype.activateListeners.toString();
const patchedFnStr = fnStr .replace(`document.addEventListener("contextmenu", ev => ev.preventDefault());`, ``);
Game.prototype.activateListeners = Function('"use strict"; return (function ' + patchedFnStr + ')')();
With this module enabled, the menu for FXMaster doesn't render; I only get the first 3 options (nothing after Snow).
Seems odd, but disabling the module gives me back the whole menu.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.