Created
July 14, 2014 18:59
-
-
Save icodeforlove/208b7e9f3e6c0912982f to your computer and use it in GitHub Desktop.
react-js-harmony-fiddle-integration.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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\[/, ''); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment