Created
August 30, 2020 16:27
-
-
Save trungx/db67245a185a6a6341afdae435381d1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script defer> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| setTimeout( function () { | |
| window.fbAsyncInit = function() { | |
| FB.init({ | |
| xfbml : true, | |
| version : 'v7.0' | |
| }); | |
| }; | |
| (function(d, s, id) { | |
| var js, fjs = d.getElementsByTagName(s)[0]; | |
| if (d.getElementById(id)) return; | |
| js = d.createElement(s); js.id = id; | |
| js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js'; | |
| fjs.parentNode.insertBefore(js, fjs); | |
| }(document, 'script', 'facebook-jssdk')); | |
| }, 1500); | |
| }); | |
| </script> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ref: https://stackoverflow.com/questions/15349867/defer-loading-of-facebook-like-button-script