mirror of
https://github.com/fruithost/Panel.git
synced 2026-11-03 02:27:26 +09:00
29 lines
599 B
JavaScript
29 lines
599 B
JavaScript
/**
|
|
* fruithost | OpenSource Hosting
|
|
*
|
|
* @author Adrian Preuß
|
|
* @version 1.0.0
|
|
* @license MIT
|
|
*/
|
|
'use strict';
|
|
|
|
class Modal {
|
|
constructor() {
|
|
if(typeof(window.showing) === 'undefined') {
|
|
console.warn('[WARNING]', 'window.showing', 'is Empty!');
|
|
return;
|
|
}
|
|
|
|
window.showing.forEach((modal) => {
|
|
let instance = new bootstrap.Modal('#' + modal, {});
|
|
|
|
if(instance) {
|
|
instance.show();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
window.addEventListener('DOMContentLoaded', () => {
|
|
window.Modal = new Modal();
|
|
}); |