Sync with Etiquette.
This commit is contained in:
		
							parent
							
								
									4bf27d4458
								
							
						
					
					
						commit
						d3555dfbf3
					
				
					 2 changed files with 15 additions and 2 deletions
				
			
		|  | @ -23,15 +23,15 @@ html | ||||||
| { | { | ||||||
|     height: 100vh; |     height: 100vh; | ||||||
|     box-sizing: border-box; |     box-sizing: border-box; | ||||||
|  |     color: var(--color_text_normal); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| *, *:before, *:after | *, *:before, *:after | ||||||
| { | { | ||||||
|     box-sizing: inherit; |     box-sizing: inherit; | ||||||
|  |     color: inherit; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| * { color: var(--color_text_normal); } |  | ||||||
| 
 |  | ||||||
| body | body | ||||||
| { | { | ||||||
|     display: grid; |     display: grid; | ||||||
|  |  | ||||||
|  | @ -171,6 +171,19 @@ function size_iframe_to_content(iframe) | ||||||
|     iframe.style.height = iframe.contentWindow.document.documentElement.scrollHeight + 'px'; |     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 /////////////////////////////////////////////////////////////////////////////////
 | // HOOKS & ADD-ONS /////////////////////////////////////////////////////////////////////////////////
 | ||||||
| ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue