Skip to content

Commit

Permalink
Merge pull request #1406 from bc-zoharmuzafi/add_this
Browse files Browse the repository at this point in the history
defer loading of addthis
  • Loading branch information
bc-zoharmuzafi authored Dec 18, 2018
2 parents 8dde869 + 4761c2a commit 71163f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Draft
- Added defer tag to addThis and defered execution of related script[#1406](https://github.com/bigcommerce/cornerstone/pull/1406)
- Fixed compare buttons for product list display [#1384](https://github.com/bigcommerce/cornerstone/pull/1384)
- Remove unnecessary API call to get cookie notification status [#1380](https://github.com/bigcommerce/cornerstone/pull/1380)
- Cart switch from quote item hash to id which is immutable [#1387](https://github.com/bigcommerce/cornerstone/pull/1387)
Expand Down
12 changes: 7 additions & 5 deletions templates/components/common/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@
{{/each}}
</ul>
<script type="text/javascript"
src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4e94ed470ee51e32"></script>
<script>
if (typeof(addthis) === "object") {
addthis.toolbox('.addthis_toolbox');
}
defer src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4e94ed470ee51e32"></script>
<script>
window.addEventListener('DOMContentLoaded', function() {
if (typeof(addthis) === "object") {
addthis.toolbox('.addthis_toolbox');
}
});
</script>
</div>
{{/if}}

0 comments on commit 71163f1

Please sign in to comment.