1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/components/appFooter/appFooter.js

37 lines
777 B
JavaScript
Raw Normal View History

2021-01-26 16:25:38 -05:00
import './appFooter.scss';
2018-10-23 01:05:09 +03:00
2021-01-26 22:20:12 -05:00
function render() {
const elem = document.createElement('div');
elem.classList.add('appfooter');
document.body.appendChild(elem);
return elem;
}
2018-10-23 01:05:09 +03:00
class appFooter {
2021-01-27 00:35:30 -05:00
constructor() {
const self = this;
2021-01-27 00:35:30 -05:00
self.element = render();
self.add = function (elem) {
self.element.appendChild(elem);
};
self.insert = function (elem) {
if (typeof elem === 'string') {
self.element.insertAdjacentHTML('afterbegin', elem);
} else {
self.element.insertBefore(elem, self.element.firstChild);
}
};
2018-10-23 01:05:09 +03:00
}
destroy() {
2020-10-07 21:12:14 +09:00
const self = this;
self.element = null;
}
}
2021-01-27 00:35:30 -05:00
export default new appFooter();