|
54 | 54 | document.getElementById("loading").style.display = "none"; |
55 | 55 | }); |
56 | 56 |
|
57 | | - const checkHook = { |
58 | | - type: "check-is-enabled", |
59 | | - callback: (check) => console.log(`Check event for ${check.key}`), |
60 | | - }; |
61 | | - bucket.on(checkHook); |
| 57 | + bucket.on("check-is-enabled", (check) => |
| 58 | + console.log(`Check event for ${check.key}`), |
| 59 | + ); |
62 | 60 |
|
63 | | - bucket.on({ |
64 | | - type: "features-updated", |
65 | | - callback: (features) => { |
66 | | - console.log("Features updated"); |
67 | | - const feature = bucket.getFeature(featureKey); |
| 61 | + bucket.on("features-updated", (features) => { |
| 62 | + console.log("Features updated"); |
| 63 | + const feature = bucket.getFeature(featureKey); |
68 | 64 |
|
69 | | - const startHuddleElem = document.getElementById("start-huddle"); |
70 | | - if (feature.isEnabled) { |
71 | | - // show the start-huddle button |
72 | | - if (startHuddleElem) startHuddleElem.style.display = "block"; |
73 | | - } else { |
74 | | - // hide the start-huddle button |
75 | | - if (startHuddleElem) startHuddleElem.style.display = "none"; |
76 | | - } |
77 | | - }, |
| 65 | + const startHuddleElem = document.getElementById("start-huddle"); |
| 66 | + if (feature.isEnabled) { |
| 67 | + // show the start-huddle button |
| 68 | + if (startHuddleElem) startHuddleElem.style.display = "block"; |
| 69 | + } else { |
| 70 | + // hide the start-huddle button |
| 71 | + if (startHuddleElem) startHuddleElem.style.display = "none"; |
| 72 | + } |
78 | 73 | }); |
79 | 74 | </script> |
80 | 75 | </body> |
|
0 commit comments