From 2a0b61b97a1eac1b18df39196ee4558d3b302cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Wed, 29 Oct 2014 19:35:27 -0700 Subject: [PATCH] Bring in jsfiddle integration script, add harmony --- _js/jsfiddle-integration.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 _js/jsfiddle-integration.js diff --git a/_js/jsfiddle-integration.js b/_js/jsfiddle-integration.js new file mode 100644 index 00000000..ae5a64f4 --- /dev/null +++ b/_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(/^\/\/