From 8a6cd42609829867a7bc2f19e3a65e1bcb4f531e Mon Sep 17 00:00:00 2001 From: John Riviello Date: Sun, 10 Jan 2021 17:54:14 -0500 Subject: [PATCH] accounting for the "Your account only lets you join meetings" message increasing the height (& therefore pushing the RMC box down for smaller viewports) --- extension/recentMeetingCodes.css | 3 +++ extension/recentMeetingCodes.js | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/extension/recentMeetingCodes.css b/extension/recentMeetingCodes.css index 384c603..2553332 100644 --- a/extension/recentMeetingCodes.css +++ b/extension/recentMeetingCodes.css @@ -108,4 +108,7 @@ .rmc-list { top: 290px; } + .rmc-list__lowerForTablet { + top: 355px; + } } \ No newline at end of file diff --git a/extension/recentMeetingCodes.js b/extension/recentMeetingCodes.js index 19ca6ec..8ee96e2 100644 --- a/extension/recentMeetingCodes.js +++ b/extension/recentMeetingCodes.js @@ -186,10 +186,25 @@ const displayError = (heading, msg) => { rmcErrorTimeoutId = window.setTimeout(hideError, RMC_ERROR_TIMEOUT * 1000); } +const isHeightOfCWizLarger = _ => { + let val = false; + let cWizChild = modalOpener; + while (cWizChild && cWizChild.parentElement && cWizChild.parentElement.nodeName != "C-WIZ") { + cWizChild = cWizChild.parentElement; + } + if (cWizChild.offsetHeight > 175) { + val = true; + } + return val; +} + const addRecentMeetingCodes = _ => { const codes = getRecentMeetingCodes(); const list = document.createElement("div"); list.classList.add(RMC_CONTAINER_CLASS); + if (isHeightOfCWizLarger()) { + list.classList.add("rmc-list__lowerForTablet"); + } const heading = document.createElement("h2"); if (codes.length == 0) { heading.innerText = "Recently used Meeting Codes will appear here";