Bring in jsfiddle integration script, add harmony

This commit is contained in:
Paul O’Shannessy
2014-10-29 19:35:27 -07:00
parent 7071d1c316
commit 0f5368341f

View File

@@ -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(/^\/\/<!\[CDATA\[/, '');
})();