@samitouri / QOS-React-2 / commits / 0f5368341f

Bring in jsfiddle integration script, add harmony

Paul O’Shannessy committed Oct 29, 2014 at 19:35 UTC 0f5368341ff96c88c3fbef57dfa089b43d129a06
1 file changed +11
docs/_js/jsfiddle-integration.js new
+11
@@ -0,0 +1,11 @@
1 +(function() {
2 + var tag = document.querySelector(
3 + 'script[type="application/javascript;version=1.7"]'
4 + );
5 + if (!tag || tag.textContent.indexOf('window.onload=function(){') !== -1) {
6 + alert('Bad JSFiddle configuration, please fork the original React JSFiddle');
7 + }
8 + tag.setAttribute('type', 'text/jsx;harmony=true');
9 + tag.textContent = tag.textContent.replace(/^\/\/<!\[CDATA\[/, '');
10 +})();
11 +