Skip to content

Commit

Permalink
chore(comment): fix copy-tab-data class comment
Browse files Browse the repository at this point in the history
  • Loading branch information
micmro committed Oct 7, 2019
1 parent 1823a56 commit 7671aef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/ts/transformers/har-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ function makeContentTab(entry: Entry) {
const lineCount = newLines ? newLines.length : 1;
return makeLazyWaterfallEntryTab(
`Content (${lineCount} Line${lineCount > 1 ? "s" : ""})`,
// class `copy-tab-data` needed to catch bubbled up click event in `details-overlay/html-details-body.ts`
() => `
<button class="copy-tab-data">Copy Content to Clipboard</button>
<pre><code>${escapeHtml(unescapedText)}</code></pre>
Expand All @@ -144,7 +145,7 @@ function makeRawData(entry: Entry) {
return makeLazyWaterfallEntryTab(
"Raw Data",
() => {
// class `copy` needed to catch bubbled up click event in `details-overlay/html-details-body.ts`
// class `copy-tab-data` needed to catch bubbled up click event in `details-overlay/html-details-body.ts`
return `
<button class="copy-tab-data">Copy Raw Data to Clipboard</button>
<pre><code>${escapeHtml(JSON.stringify(entry, null, 2))}</code></pre>
Expand Down
2 changes: 1 addition & 1 deletion src/ts/waterfall/details-overlay/svg-details-overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const onTabDataCopyClick = (event: MouseEvent) => {
el.value = btn.nextElementSibling ? (btn.nextElementSibling as HTMLElement).innerText : "";
document.body.appendChild(el);
el.select();
el.setSelectionRange(0, 99999);
el.setSelectionRange(0, 99999); // for mobile
document.execCommand("copy");
document.body.removeChild(el);
}
Expand Down

0 comments on commit 7671aef

Please sign in to comment.