mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 14:40:09 +01:00
14 lines
344 B
JavaScript
14 lines
344 B
JavaScript
import { $$ } from './dom';
|
|
import { TagsInput } from "./tag_input";
|
|
|
|
const setupSite = function() {
|
|
Array.prototype.forEach.call($$('.js-tag-input'), (el) => {
|
|
new TagsInput(el).attach();
|
|
});
|
|
};
|
|
|
|
if (document.readyState !== 'loading') {
|
|
setupSite();
|
|
} else {
|
|
document.addEventListener('DOMContentLoaded', setupSite);
|
|
}
|