diff --git a/index.html b/index.html index 4589100..5341d63 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + diff --git a/src/shareon.js b/src/shareon.js index c15233d..4ecfdb9 100644 --- a/src/shareon.js +++ b/src/shareon.js @@ -71,25 +71,27 @@ const init = () => { url: encodeURIComponent( child.dataset.url || container.dataset.url || - window.location.href + window.location.href, ), title: encodeURIComponent( - child.dataset.title || container.dataset.title || document.title + child.dataset.title || + container.dataset.title || + document.title, ), media: encodeURIComponent( - child.dataset.media || container.dataset.media || "" + child.dataset.media || container.dataset.media || "", ), text: encodeURIComponent( - child.dataset.text || container.dataset.text || "" + child.dataset.text || container.dataset.text || "", ), via: encodeURIComponent( - child.dataset.via || container.dataset.via || "" + child.dataset.via || container.dataset.via || "", ), hashtags: encodeURIComponent( - child.dataset.hashtags || container.dataset.hashtags || "" + child.dataset.hashtags || container.dataset.hashtags || "", ), fbAppId: encodeURIComponent( - child.dataset.fbAppId || container.dataset.fbAppId || "" + child.dataset.fbAppId || container.dataset.fbAppId || "", ), }; const url = urlBuilderMap[cls](preset);