Hopefully present chalkboard to people without write permissions in a cleaner format.
This commit is contained in:
+8
-3
@@ -2650,6 +2650,7 @@ function flushLiveRegion(elementId) {
|
||||
|
||||
let text = state.queue.shift();
|
||||
if(text === undefined) {
|
||||
announcement.replaceChildren();
|
||||
state.active = false;
|
||||
return;
|
||||
}
|
||||
@@ -2690,6 +2691,10 @@ function getChalkboardView() {
|
||||
return document.getElementById('chalkboard-view');
|
||||
}
|
||||
|
||||
function getChalkboardViewText() {
|
||||
return document.getElementById('chalkboard-view-text');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
*/
|
||||
@@ -2700,9 +2705,9 @@ function setChalkboardText(text) {
|
||||
if(editor && editor.value !== text)
|
||||
editor.value = text;
|
||||
|
||||
let view = getChalkboardView();
|
||||
if(view && view.textContent !== text)
|
||||
view.textContent = text;
|
||||
let viewText = getChalkboardViewText();
|
||||
if(viewText && viewText.textContent !== text)
|
||||
viewText.textContent = text;
|
||||
}
|
||||
|
||||
function chalkboardHasFocus() {
|
||||
|
||||
Reference in New Issue
Block a user