Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/build-dt-report-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ writeFile('templates.html', htmlReportAssets.REPORT_TEMPLATES);

const pathToReportAssets = require.resolve('../clients/devtools-report-assets.js');
browserify(generatorFilename, {standalone: 'Lighthouse.ReportGenerator'})
// Shims './html/html-report-assets' to resolve to devtools-report-assets.
.require(pathToReportAssets, {expose: './html/html-report-assets'})
// Shims './html/html-report-assets.js' to resolve to devtools-report-assets.js
.require(pathToReportAssets, {expose: './html/html-report-assets.js'})
.bundle((err, src) => {
if (err) throw err;
fs.writeFileSync(bundleOutFile, src.toString());
Expand Down
8 changes: 6 additions & 2 deletions lighthouse-core/report/html/renderer/report-ui-features.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,12 @@ class ReportUIFeatures {
case 'print-summary':
this.collapseAllDetails();
this.closeToolsDropdown();
self.print();
this._print();
break;
case 'print-expanded':
this.expandAllDetails();
this.closeToolsDropdown();
self.print();
this._print();
break;
case 'save-json': {
const jsonStr = JSON.stringify(this.json, null, 2);
Expand Down Expand Up @@ -463,6 +463,10 @@ class ReportUIFeatures {
this._document.removeEventListener('keydown', this.onKeyDown);
}

_print() {
self.print();
}

/**
* Keydown handler for the document.
* @param {KeyboardEvent} e
Expand Down
9 changes: 0 additions & 9 deletions lighthouse-core/report/html/templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,6 @@
cursor: pointer;
margin-right: 5px;
}
/*
Some features in the tools dropdown menu don't work in the DevTools
client. They could with some tweaks, but currently they don't. For example:
Saving as HTML/JSON - does not bring up a file dialog, as one would expect in DevTools.
also, it saves the AuditsPanel HTML, which is funky.
*/
.lh-devtools .lh-tools__button {
display: none;
}
.lh-tools__button svg {
fill: var(--lh-tools-icon-color);
}
Expand Down