diff --git a/docs/js/JSFiddleIntegration.js b/docs/js/JSFiddleIntegration.js new file mode 100644 index 0000000000000..462d96c2d4ff2 --- /dev/null +++ b/docs/js/JSFiddleIntegration.js @@ -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/jsx'); +tag.textContent = tag.textContent.replace(/^\/\/