Skip to content

Commit

Permalink
Merge pull request #40 from jesstelford/no-jsfiddle-#38
Browse files Browse the repository at this point in the history
Remove jsFiddle support
  • Loading branch information
jesstelford committed Mar 9, 2016
2 parents 622ac25 + 606e4f5 commit 1867eae
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/js/components/extractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,35 +213,6 @@ let Extractor = React.createClass({

},

handleJsfiddle() {
event.stopPropagation();
event.preventDefault();

// Note we give instructions to click Run because JSFiddle doesn't correctly
// execute the JSX post-babel transform on the first (page load) run.
// Subsequent runs work fine.
linkTrigger('jsfiddle', 'Click <i>Run</i> to see results', function(output) {

// Code required to trigger babel conversion of JSX
var html = output.html
+ '\n\n'
+ '<!-- Trigger babel conversion of JSX -->\n'
+ '<script>document.querySelector(\'script[type="application/javascript;version=1.7"]\').setAttribute(\'type\', \'text/babel\');</script>';

return {
url: 'http://jsfiddle.net/api/post/library/pure/',
data: {
html: html,
css: output.css,
js: output.js,
resources: 'https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.js,https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react.min.js,https://cdnjs.cloudflare.com/ajax/libs/react/0.14.6/react-dom.min.js',
wrap: 'h',// No wrap, in the head
panel_js: 2 // version 1.7
}
}
});
},

render() {

let inspectedContent = this.state.prettyInspected,
Expand All @@ -262,7 +233,6 @@ let Extractor = React.createClass({
</pre>
<p>Generate and upload to...</p>
<button {...buttonProps} onClick={this.handleCodepen}>Codepen</button>
<button {...buttonProps} onClick={this.handleJsfiddle}>JSFiddle</button>
</div>
);
}
Expand Down

0 comments on commit 1867eae

Please sign in to comment.