diff --git a/index.html b/index.html index 2cef813..c13f161 100644 --- a/index.html +++ b/index.html @@ -109,8 +109,8 @@ diff --git a/src/index.js b/src/index.js index ef7818d..c8b3e45 100644 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,9 @@ -import initializeShareon from "./shareon"; +import { init } from "./shareon"; // TODO: update README const s = document.currentScript; if (s && s.hasAttribute("init")) { - initializeShareon(); + init(); } -export { default } from "./shareon"; +export { init } from "./shareon"; diff --git a/src/shareon.js b/src/shareon.js index a1f818e..bb6a19d 100644 --- a/src/shareon.js +++ b/src/shareon.js @@ -34,7 +34,7 @@ const openUrl = (buttonUrl) => () => { window.open(buttonUrl, "_blank", "noopener,noreferrer"); }; -const initializeShareon = () => { +const init = () => { const shareonContainers = document.querySelectorAll(".shareon"); // iterate over
@@ -90,4 +90,4 @@ const initializeShareon = () => { } }; -export default initializeShareon; +export { init };