Skip to content

Commit

Permalink
Bring in jsfiddle integration script, add harmony
Browse files Browse the repository at this point in the history
  • Loading branch information
zpao committed Oct 30, 2014
1 parent 7071d1c commit 0f53683
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/_js/jsfiddle-integration.js
Original file line number Diff line number Diff line change
@@ -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\[/, '');
})();

0 comments on commit 0f53683

Please sign in to comment.