[docs] Add jsfiddle integration for Babel

This commit is contained in:
Paul O’Shannessy
2015-09-11 11:19:23 -07:00
parent ed11f83763
commit 4a45ad38b3

View File

@@ -0,0 +1,10 @@
(function() {
var tag = document.querySelector(
'script[type="application/javascript;version=1.7"]'
);
if (!tag || tag.textContent.indexOf('window.onload=function(){') !== -1) {
alert('Bad JSFiddle configuration, please fork the original React JSFiddle');
}
tag.setAttribute('type', 'text/babel');
tag.textContent = tag.textContent.replace(/^\/\/<!\[CDATA\[/, '');
})();