I'm doing an integration with a social plugin and am having a problem.
My code:
linkedin : function(self){
var sett = self.options.buttons.linkedin;
$(self.element).find('.buttons').append('<div class="button linkedin"><script type="IN/Share" data-url="'+(sett.url !== '' ? sett.url : self.options.url)+'" data-counter="'+sett.counter+'"></script></div>');
var loading = 0;
if(typeof window.IN === 'undefined' && loading == 0){
loading = 1;
(function() {
var li = document.createElement('script');li.type = 'text/javascript';li.async = true;
li.src = '//platform.linkedin.com/in.js';
var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s);
})();
}
else{
window.IN.init();
}
},
The above code is responsible for creating something like:
<script src="//platform.linkedin.com/in.js" type="text/javascript"></script>
<script type="IN/Share" data-counter="top"></script>
/ p>
So:
<script src="//platform.linkedin.com/in.js" type="text/javascript">
lang: pt_BR
</script>
<script type="IN/Share" data-counter="top"></script>
Could this adaptation be possible? how?