RevealAllSpoilers: use cmd key on macOS (#3697)

This commit is contained in:
정현수 2025-10-07 05:52:35 +09:00 committed by GitHub
parent 66a8eb4854
commit d77fa7c206
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Devs } from "@utils/constants";
import { Devs, IS_MAC } from "@utils/constants";
import definePlugin from "@utils/types";
import { findByPropsLazy } from "@webpack";
@ -39,9 +39,9 @@ export default definePlugin({
],
reveal(event: MouseEvent) {
const { ctrlKey, shiftKey, target } = event;
const { ctrlKey, metaKey, shiftKey, target } = event;
if (!ctrlKey) { return; }
if (!(IS_MAC ? metaKey : ctrlKey)) { return; }
const { spoilerContent, hidden } = SpoilerClasses;
const { messagesWrapper } = MessagesClasses;