mirror of
https://github.com/koloml/philomena-tagging-assistant.git
synced 2026-09-23 04:19:39 +00:00
Added Tag Presets, popup editor for them, implemented presets image edit
This commit is contained in:
11
src/lib/dom-utils.ts
Normal file
11
src/lib/dom-utils.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Reusable function to create icons from FontAwesome. Usable only for website, since extension doesn't host its own
|
||||
* copy of FA styles. Extension should use imports of SVGs inside CSS instead.
|
||||
* @param iconSlug Slug of the icon to be added.
|
||||
* @return Element with classes for FontAwesome icon added.
|
||||
*/
|
||||
export function createFontAwesomeIcon(iconSlug: string): HTMLElement {
|
||||
const iconElement = document.createElement('i');
|
||||
iconElement.classList.add('fa-solid', `fa-${iconSlug}`);
|
||||
return iconElement;
|
||||
}
|
||||
Reference in New Issue
Block a user