Last active
April 20, 2023 17:13
-
-
Save mrhalix/9b2f57c7e34cb49db970aa094c40ae4f to your computer and use it in GitHub Desktop.
Add menu item in bigbluebutton meeting sidebar / check https://github.com/manishkatyan/bbb-jamboard for more info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var menu = document.querySelector('div[data-test="chatButton"]').parentElement; | |
var sectionDiv = document.createElement("div"); | |
var iconDiv1 = document.createElement("div"); | |
var iconDiv2 = document.createElement("div"); | |
var iconDiv3 = document.createElement("div"); | |
var iconDiv3 = document.createElement("div"); | |
var iconIcon = document.createElement("i"); | |
var textDiv = document.createElement("div"); | |
var textSpan = document.createElement("span"); | |
var meetingId = document.querySelector('svg[data-test="whiteboard"]').innerHTML.match("\/bigbluebutton\/presentation\/(.*)\/.*\/.*\/svg/")[1]; | |
// --- | |
sectionDiv.classList = "sc-hKUcmH sc-ijeLaK lkSQgy cwQWPD"; | |
sectionDiv.setAttribute("role", "button"); | |
sectionDiv.setAttribute("aria-expanded", "false"); | |
sectionDiv.setAttribute("tabindex", "-1"); | |
sectionDiv.setAttribute("accesskey", "P"); | |
sectionDiv.id = "attendance-page"; | |
sectionDiv.setAttribute("aria-label", "حضور و غیاب"); | |
// --- | |
iconDiv1.classList = "sc-eSRRmr gpvuaP" | |
iconDiv1.onclick = function () { | |
window.location = meetingId | |
} | |
// --- | |
iconDiv2.classList = "sc-auqbC hEKxRF" | |
// --- | |
iconDiv3.classList = "sc-jfBFGL ivWQKJ" | |
// --- | |
iconIcon.classList = "icon-bbb-group_chat" | |
// --- | |
textSpan.classList = "sc-kiowOE hsleVy"; | |
textSpan.innerText = "حضور و غیاب" | |
// --- | |
textDiv.classList = "sc-cLqoAx iagYmL"; | |
textDiv.setAttribute("aria-live", "off"); | |
// --- | |
textDiv.appendChild(textSpan) | |
iconDiv3.appendChild(iconIcon) | |
iconDiv2.appendChild(iconDiv3) | |
iconDiv1.appendChild(iconDiv2) | |
iconDiv1.appendChild(textDiv) | |
sectionDiv.appendChild(iconDiv1) | |
menu.appendChild(sectionDiv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment