Skip to content

Instantly share code, notes, and snippets.

@brianly
Created August 4, 2014 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianly/3c15649358768c4748ca to your computer and use it in GitHub Desktop.
Save brianly/3c15649358768c4748ca to your computer and use it in GitHub Desktop.
<script type="text/javascript">
// This is to deal with IE and style leakages
// see: http://stackoverflow.com/a/10557782/22466
(function () {
var head = document.getElementsByTagName('head')[0];
var style = document.createElement('style');
var completed = false;
style.type = 'text/css';
style.styleSheet.cssText = ':before,:after{content:none !important';
head.appendChild(style);
// wait till the iframe has loaded and the Yammer library is ready
// before we remove this style change
yam.on('all', function () {
if (completed) { return; }
completed = true;
setTimeout(function(){
head.removeChild(style);
}, 0);
});
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment