Skip to content

Commit

Permalink
accounting for the "Your account only lets you join meetings" message
Browse files Browse the repository at this point in the history
increasing the height
(& therefore pushing the RMC box down for smaller viewports)
  • Loading branch information
JohnRiv committed Jan 10, 2021
1 parent 95a02dd commit 8a6cd42
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extension/recentMeetingCodes.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,7 @@
.rmc-list {
top: 290px;
}
.rmc-list__lowerForTablet {
top: 355px;
}
}
15 changes: 15 additions & 0 deletions extension/recentMeetingCodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 8a6cd42

Please sign in to comment.