yosup/web/js/util.js
Thomas Mathews 9f2af26fa6 web: Add profile view.
Note that this is incomplete as I do not fetch the events for the user
and render them. I am also missing the state check for if you follow the
user.
2022-11-18 17:12:00 -08:00

15 lines
478 B
JavaScript

/* find_node is a short name for document.querySelector, it also takes in a
* parent element to search on.
*/
function find_node(selector, parentEl) {
const el = parentEl ? parentEl : document;
return el.querySelector(selector)
}
/* find_nodes is a short name for document.querySelectorAll, it also takes in a
* parent element to search on.
*/
function find_nodes(selector, parentEl) {
const el = parentEl ? parentEl : document;
return el.querySelectorAll(selector)
}