From 1ab52cb174e2e7e741e8df4030b58695d29b08d3 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Wed, 22 Aug 2018 16:55:25 +0300 Subject: [PATCH] Correct targeting --- client/src/builtin/EmoteModule.js | 4 ++-- client/src/ui/components/contextmenu/Group.vue | 6 ++++-- client/src/ui/components/contextmenu/Toggle.vue | 6 +++--- client/src/ui/contextmenus.js | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/client/src/builtin/EmoteModule.js b/client/src/builtin/EmoteModule.js index 5b26bcba..71a4031b 100644 --- a/client/src/builtin/EmoteModule.js +++ b/client/src/builtin/EmoteModule.js @@ -60,8 +60,8 @@ export default new class EmoteModule extends BuiltinModule { { text: 'Favourite', type: 'toggle', - checked: false, - onChange: (checked, target) => { console.log(target); return checked; } + checked: (target) => { console.log(target); if (target.alt && target.alt === ';cirThree;') { console.log('yes'); return true; } else return false; }, + onChange: (checked, target) => { if (target.alt && target.alt === ';cirThree;') { console.log('yes'); return true; } else return false; } } ], filter => filter.closest('.bd-emote')); diff --git a/client/src/ui/components/contextmenu/Group.vue b/client/src/ui/components/contextmenu/Group.vue index 79777f74..df2a4cef 100644 --- a/client/src/ui/components/contextmenu/Group.vue +++ b/client/src/ui/components/contextmenu/Group.vue @@ -12,14 +12,14 @@