mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
Merge branch 'BetterSEQTA:main' into main
This commit is contained in:
@@ -26,6 +26,14 @@
|
|||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@layer base, override;
|
||||||
|
|
||||||
|
@layer override {
|
||||||
|
* {
|
||||||
|
font-family: Rubik, sans-serif !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
background: #161616 !important;
|
background: #161616 !important;
|
||||||
background-color: #161616;
|
background-color: #161616;
|
||||||
|
|||||||
@@ -22,10 +22,6 @@
|
|||||||
font-family: Rubik, sans-serif !important;
|
font-family: Rubik, sans-serif !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
*:not([class^="Canvas__canvas___"]):not([class^="Canvas__canvas___"] *):not([class^="ThemeCard__"]):not([class^="ThemeCard__"] *):not([class^="ThemePreview__"]):not([class^="ThemePreview__"] *):not([class^="academicReportsWrapper"]):not([class^="academicReportsWrapper"] *):not(textarea):not(.doesntexist) {
|
|
||||||
font-family: Rubik, sans-serif !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
::view-transition-old(root),
|
::view-transition-old(root),
|
||||||
::view-transition-new(root) {
|
::view-transition-new(root) {
|
||||||
animation: none;
|
animation: none;
|
||||||
@@ -2374,7 +2370,7 @@ div.bar.flat {
|
|||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
padding-left: 8px !important;
|
padding-left: 8px !important;
|
||||||
gap: 0 8px;
|
gap: 0 8px;
|
||||||
background: var(--better-main);
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
.cke_toolbar:has(.cke_toolgroup) {
|
.cke_toolbar:has(.cke_toolgroup) {
|
||||||
.cke_combo {
|
.cke_combo {
|
||||||
|
|||||||
@@ -630,73 +630,6 @@ export function init() {
|
|||||||
HideMenuItems();
|
HideMenuItems();
|
||||||
tryLoad();
|
tryLoad();
|
||||||
|
|
||||||
// Auto-focus WISP direct online submission editor when pane opens
|
|
||||||
eventManager.register(
|
|
||||||
"wispassessmentAdded",
|
|
||||||
{
|
|
||||||
customCheck: (el) =>
|
|
||||||
el.classList.contains("wispassessment") ||
|
|
||||||
el.querySelector(".wispassessment") !== null,
|
|
||||||
},
|
|
||||||
(element) => {
|
|
||||||
const wispassessment = element.classList.contains("wispassessment")
|
|
||||||
? (element as Element)
|
|
||||||
: element.querySelector(".wispassessment");
|
|
||||||
if (!wispassessment) return;
|
|
||||||
|
|
||||||
const focusEditableBody = (iframe: HTMLIFrameElement) => {
|
|
||||||
try {
|
|
||||||
const doc = iframe.contentDocument;
|
|
||||||
const win = iframe.contentWindow;
|
|
||||||
if (doc?.body && win) {
|
|
||||||
const editable =
|
|
||||||
doc.body.querySelector(".cke_editable") || doc.body;
|
|
||||||
const el = editable as HTMLElement;
|
|
||||||
el.focus();
|
|
||||||
const range = doc.createRange();
|
|
||||||
range.selectNodeContents(el);
|
|
||||||
range.collapse(true);
|
|
||||||
const sel = win.getSelection();
|
|
||||||
if (sel) {
|
|
||||||
sel.removeAllRanges();
|
|
||||||
sel.addRange(range);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} catch (_) {}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
const focusEditor = () => {
|
|
||||||
const iframe = wispassessment.querySelector(".cke_wysiwyg_frame");
|
|
||||||
if (iframe instanceof HTMLIFrameElement) {
|
|
||||||
if (focusEditableBody(iframe)) return;
|
|
||||||
iframe.focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const ckeditor = (window as any).CKEDITOR;
|
|
||||||
if (ckeditor?.instances?.editor1) {
|
|
||||||
try {
|
|
||||||
ckeditor.instances.editor1.focus();
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const iframe = wispassessment.querySelector(".cke_wysiwyg_frame");
|
|
||||||
if (iframe instanceof HTMLIFrameElement) {
|
|
||||||
iframe.addEventListener(
|
|
||||||
"load",
|
|
||||||
() => focusEditableBody(iframe),
|
|
||||||
{ once: true },
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
[1000, 1200, 1500].forEach((delay) =>
|
|
||||||
setTimeout(focusEditor, delay),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const legacyElement = document.querySelector(
|
const legacyElement = document.querySelector(
|
||||||
".outside-container .bottom-container",
|
".outside-container .bottom-container",
|
||||||
|
|||||||
Reference in New Issue
Block a user