Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defer loading of addthis #1406

Merged
1 commit merged into from Dec 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() {
mattolson marked this conversation as resolved.
Show resolved Hide resolved
if (typeof(addthis) === "object") {
addthis.toolbox('.addthis_toolbox');
}
});
</script>
</div>
{{/if}}