Conversation
|
code change: fixed indentation (tab vs spaces?) for context_menu.js, this was initially an userscript; |
| var buttonDisabledColor = int_to_hexcode(rgb_to_int(buttonDisabledRgb[0], buttonDisabledRgb[1], buttonDisabledRgb[2])); | ||
| var outlineColor = int_to_hexcode(rgb_to_int(outlineRgb[0], outlineRgb[1], outlineRgb[2])); | ||
|
|
||
| ctxMenuStyle.innerHTML = ".custom_ctx {" + |
There was a problem hiding this comment.
you may want to use tick marks for this, ex:
ctxMenuStyle.innerHTML = `
.custom_ctx {
background-color: ${color};
}
`;
There was a problem hiding this comment.
fp you dont even use tickmarks yourself sometimes when necessary (i peeked at the code and you used STRING ADDITION omfg) -gimmickCellar
| Math.max(0, rgb[2] + outlineDelta) | ||
| ]; | ||
|
|
||
| var buttonColor = int_to_hexcode(rgb_to_int(buttonRgb[0], buttonRgb[1], buttonRgb[2])); |
There was a problem hiding this comment.
feel free to use the spread operator, ex:
rgb_to_int(...buttonRgb)
|
i was trying to follow the already implied style, but i'll do the better formatting instead then, thanks idk exactly what you did but i dont think you changed the code so i'll do that |
|
i'll leave it to your choice and to another commit if you wanna do the same for the original menu_color function |
Adds a custom context menu that's opened by right-clicking the canvas or canvas links (opens the same menu). Uses a new class that has similar functions to the top right menu.
Recommended next steps: Move it to inside the screen when resizing, improve option variable names