downshiftorg / prophoto-issues

Public issue tracking for ProPhoto 6
8 stars 8 forks source link

Add a filter to remove Facebook include script conditionally #825

Open postmastersteve opened 6 years ago

postmastersteve commented 6 years ago

When a ProPhoto 6 site needs the Facebook sdk.js file, it should be included. But when the page uses no Facebook features, we should not include the sdk.js file.

Right now, it is included whether the site uses built-in Facebook features or not:

<script> (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 = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.4"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script>

postmastersteve commented 6 years ago

+1 Florian Weiler ticket 173630

postmastersteve commented 6 years ago

+1 Andrew Paules ticket 175648