
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.
15 lines
478 B
JavaScript
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)
|
|
}
|