Merge pull request #13 from amiceli/add-default-export

Closes #11
This commit is contained in:
Nikita Karamov 2020-07-23 11:17:25 +02:00 committed by GitHub
commit b3a4cd1593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,7 @@ function initShareonChild(child: HTMLElement, preset: PublishPreset) {
}
}
window.onload = () => {
const initializeShareon = () : void => {
const shareonContainers = document.getElementsByClassName('shareon');
for (let i = 0; i < shareonContainers.length; i += 1) {
@ -70,3 +70,7 @@ window.onload = () => {
}
}
};
window.onload = () => { initializeShareon(); };
export default initializeShareon;