injecting into table, created table header, and buttons for each row

This commit is contained in:
Sriram Hariharan
2023-03-03 21:57:00 -06:00
parent beb61176c1
commit e9c420a873
7 changed files with 111 additions and 18 deletions

View File

@@ -7,22 +7,25 @@ import getSiteSupport, { SiteSupport } from './lib/getSiteSupport';
import PopupMain from './components/PopupMain';
const support = getSiteSupport(window.location.href);
if (!support) {
throw new Error('UT Registration Plus does not support this page, even though it should...');
}
if (isExtensionPopup()) {
render(<PopupMain />, document.getElementById('root'));
}
if (support.includes(SiteSupport.COURSE_CATALOG)) {
if (support === SiteSupport.COURSE_CATALOG_DETAILS || support === SiteSupport.COURSE_CATALOG_LIST) {
const shadowDom = createShadowDOM('ut-registration-plus-dom-container');
render(<CourseCatalogMain support={support} />, shadowDom.shadowRoot);
shadowDom.addStyle('static/css/content.css');
}
if (support.includes(SiteSupport.WAITLIST)) {
if (support === SiteSupport.WAITLIST) {
// TODO: Implement waitlist support
}
if (support.includes(SiteSupport.UT_PLANNER)) {
if (support === SiteSupport.UT_PLANNER) {
// TODO: Implement ut planner support
}