Include Twitter script after Twitter button
The Twitter button would frequently fail to render properly because the script which dynamically creates the proper widget would load before the DOM element which serves as the placeholder for the widget hadn't yet been created. This change ensures that the widget script is always loaded after the placeholder has been created.
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
script.
|
||||
! function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0],
|
||||
p = /^http:/.test(d.location) ? 'http' : 'https';
|
||||
if (!d.getElementById(id)) {
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.src = p + '://platform.twitter.com/widgets.js';
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}
|
||||
}(document, 'script', 'twitter-wjs');
|
||||
Reference in New Issue
Block a user