Skip to content

Commit

Permalink
don't auto copy - it might remove user's clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Aug 28, 2023
1 parent 6c2af68 commit 34a8bdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Export.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export default class Export extends React.Component {
<p>S.O. does not support es6 modules yet so picking "As Module" puts the code in a &lt;script&gt; in the HTML area.</p>
</div>
<div className="copy-text">
<pre className="layout-scrollbar" onClick={selectAndCopy} style={{userSelect: 'all', overflow: 'auto', height: '5em'}}>{makeSnippet(data, asModule)}</pre>
<pre className="layout-scrollbar" style={{userSelect: 'all', overflow: 'auto', height: '5em'}}>{makeSnippet(data, asModule)}</pre>
<div className="copy-buttons">
<button type="button" onClick={() => navigator.clipboard.writeText(makeSnippet(data, asModule))}>copy</button>
</div>
Expand All @@ -218,7 +218,7 @@ export default class Export extends React.Component {
<div><input type="radio" id="export-as-script" checked={!asModule} onChange={_ => this.onChange(false)}/><label htmlFor="export-as-script">As script</label></div>
</div>
<div className="copy-text">
<pre className="layout-scrollbar" onClick={selectAndCopy} style={{userSelect: 'all', overflow: 'auto', height: '5em'}}>{makeHTML(data, asModule)}</pre>
<pre className="layout-scrollbar" style={{userSelect: 'all', overflow: 'auto', height: '5em'}}>{makeHTML(data, asModule)}</pre>
<div className="copy-buttons">
<button type="button" onClick={this.saveToFile}>save</button>
<button type="button" onClick={() => navigator.clipboard.writeText(makeHTML(data, asModule))}>copy</button>
Expand Down

0 comments on commit 34a8bdf

Please sign in to comment.