Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Commit

Permalink
Move the print commands before the default case.
Browse files Browse the repository at this point in the history
  This is necessary otherwise pressing print goes fullscreen
on Firefox 55.
  • Loading branch information
ExE-Boss committed Aug 21, 2017
1 parent c7f6d5a commit 08ed201
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,6 @@ async function handlePopupMessage(message) {
return browser.tabs.create({url: "about:customizing"});
} case "devGetTools": {
return browser.tabs.create({url: "https://addons.mozilla.org/firefox/collections/mozilla/webdeveloper/"});
} case "printPreview": {
return browser.tabs.printPreview();
} case "print": {
if (browser.tabs.print) {
return browser.tabs.print();
}
} case "fullscreen": {
let prevState = window.state;
let newState = prevStates.get(window.id);
Expand All @@ -224,6 +218,12 @@ async function handlePopupMessage(message) {
} case "exit": {
let windows = await browser.windows.getAll();
windows.forEach(({ id }) => browser.windows.remove(id));
} case "printPreview": {
return browser.tabs.printPreview();
} case "print": {
if (browser.tabs.print) {
return browser.tabs.print();
}
} default: {
if (method.startsWith("openHelp")) {
let lang = browser.i18n.getUILanguage().replace(/_/g, "-");
Expand Down

0 comments on commit 08ed201

Please sign in to comment.