diff --git a/docs/_js/jsfiddle-integration.js b/docs/_js/jsfiddle-integration.js new file mode 100644 index 0000000000000..ae5a64f42a36c --- /dev/null +++ b/docs/_js/jsfiddle-integration.js @@ -0,0 +1,11 @@ +(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;harmony=true'); + tag.textContent = tag.textContent.replace(/^\/\/