From 5de65b5d6bf7d7293bf221f4fcdd6900e6146421 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 4 Feb 2017 01:05:17 +0200 Subject: [PATCH 01/11] Viewer: fix "Export -> Save as..." in Firefox. (#1626) For some weird reason, Firefox needs `document.body.appendChild(a)` too. --- lighthouse-viewer/app/src/lighthouse-report-viewer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lighthouse-viewer/app/src/lighthouse-report-viewer.js b/lighthouse-viewer/app/src/lighthouse-report-viewer.js index 05470ae1d6af..eb2f51f4a01d 100644 --- a/lighthouse-viewer/app/src/lighthouse-report-viewer.js +++ b/lighthouse-viewer/app/src/lighthouse-report-viewer.js @@ -361,9 +361,12 @@ class LighthouseViewerReport extends LighthouseReport { const a = document.createElement('a'); a.download = `${filename}${ext}`; a.href = URL.createObjectURL(blob); + document.body.appendChild(a); // Firefox requires anchor to be in the DOM. a.click(); - setTimeout(_ => URL.revokeObjectURL(a.href), 500); // cleanup. + // cleanup. + document.body.removeChild(a); + setTimeout(_ => URL.revokeObjectURL(a.href), 500); } /** From 59f2f82018c8a4b3300b10593a24c35b32a957db Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Fri, 3 Feb 2017 17:00:15 -0800 Subject: [PATCH 02/11] CRX: make disabling extension during run optional (#1604) --- lighthouse-extension/app/popup.html | 11 ++++- .../app/src/lighthouse-background.js | 45 +++++++++++++------ lighthouse-extension/app/src/popup.js | 16 ++++--- .../app/styles/lighthouse.css | 3 +- 4 files changed, 53 insertions(+), 22 deletions(-) diff --git a/lighthouse-extension/app/popup.html b/lighthouse-extension/app/popup.html index d542293d044f..a12826d98abb 100644 --- a/lighthouse-extension/app/popup.html +++ b/lighthouse-extension/app/popup.html @@ -57,8 +57,17 @@

...