Sync with Etiquette.

This commit is contained in:
voussoir 2021-01-11 15:36:16 -08:00
parent 4bf27d4458
commit d3555dfbf3
2 changed files with 15 additions and 2 deletions

View file

@ -23,15 +23,15 @@ html
{
height: 100vh;
box-sizing: border-box;
color: var(--color_text_normal);
}
*, *:before, *:after
{
box-sizing: inherit;
color: inherit;
}
* { color: var(--color_text_normal); }
body
{
display: grid;

View file

@ -171,6 +171,19 @@ function size_iframe_to_content(iframe)
iframe.style.height = iframe.contentWindow.document.documentElement.scrollHeight + 'px';
}
common.update_dynamic_elements =
function update_dynamic_elements(class_name, text)
{
/*
Find all elements with this class and set their innertext to this text.
*/
const elements = document.getElementsByClassName(class_name);
for (const element of elements)
{
element.innerText = text;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
// HOOKS & ADD-ONS /////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////