'How can I account for users' ad blocker with pinit.js
I'm building a wordpress plugin that will all the user to share the current page on select social networks. The plugin reaches out to pinterest to load pinit.js, however I am running into issues when the user has an ad blocker on their browser.
Is there a way to work around this? My share functionality is still intact, it's really the styling and alignment that seems to be affected. So maybe I could set up some fall back styles in that case. I'm seeing the following error in the browser:
GET http://assets.pinterest.com/js/pinit.js net::ERR_BLOCKED_BY_CLIENT
The following script is calling for the js file and throwing the error:
<script type="text/javascript">
(function (d) {
var f = d.getElementsByTagName('SCRIPT')[0],
p = d.createElement('SCRIPT');
p.type = 'text/javascript';
p.async = true;
p.src = '//assets.pinterest.com/js/pinit.js';
f.parentNode.insertBefore(p, f);
})(document);
</script>
<script>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
