Skip to content

Commit

Permalink
rcp: fix timing issue with DsM plugin detection
Browse files Browse the repository at this point in the history
  • Loading branch information
SlimRunner committed Jan 23, 2022
1 parent 5f0928f commit a093a45
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions right-click-patch/dcg-rmb-color.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name DesmosColorRightClick
// @namespace slidav.Desmos
// @version 1.1.6
// @version 1.1.7
// @author SlimRunner (David Flores)
// @description Overrides context menu for color bubble
// @grant none
Expand All @@ -27,11 +27,16 @@

// initializes the event listeners
function initListeners () {
const isInDesmodder = (
window.DesModder == undefined?
() => false:
() => window.DesModder.controller.isPluginEnabled('right-click-tray')
);
const isInDesmodder = () => {
if (window.DesModder == undefined) {
return false;
} else {
return window
.DesModder
.controller
.isPluginEnabled('right-click-tray');
}
};
let showContextMenu = true;

// cancels standard context menu
Expand Down

0 comments on commit a093a45

Please sign in to comment.