Created
February 13, 2019 13:24
-
-
Save nleush/fa069b3434e6784798b625be7c7391f9 to your computer and use it in GitHub Desktop.
Twitter error check
This file contains 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
var t = window.twttr = window.twttr || {}; | |
t._e = t._e || []; | |
t.ready = function(f) { | |
t._e.push(f); | |
}; | |
twttr.ready(function (twttr) { | |
twttr.events.bind( | |
'loaded', | |
function (event) { | |
event.widgets.forEach(function (widget) { | |
if (!widget.id || !widget.id.match(/^twitter-widget/)) { | |
// handle the tweet disappearance here | |
} | |
}); | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment