aboutsummaryrefslogtreecommitdiff
path: root/src/background/zooms.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-03 16:13:02 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-03 16:13:02 +0900
commite0bff54a827bcf15931ed651d4a5279b352a2961 (patch)
tree94e14ab19e1b1834f533f5d6763b8b62cc8dcf94 /src/background/zooms.js
parent68753b3660f0d6996c9b5a3c433d2cdc275dd4e4 (diff)
use promise and show errors
Diffstat (limited to 'src/background/zooms.js')
-rw-r--r--src/background/zooms.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/background/zooms.js b/src/background/zooms.js
index bb65030..e3e2aa6 100644
--- a/src/background/zooms.js
+++ b/src/background/zooms.js
@@ -10,7 +10,7 @@ const ZOOM_SETTINGS = [
];
const zoomIn = (tabId = undefined) => {
- browser.tabs.getZoom(tabId).then((factor) => {
+ return browser.tabs.getZoom(tabId).then((factor) => {
for (let f of ZOOM_SETTINGS) {
if (f > factor) {
browser.tabs.setZoom(tabId, f);
@@ -21,7 +21,7 @@ const zoomIn = (tabId = undefined) => {
};
const zoomOut = (tabId = undefined) => {
- browser.tabs.getZoom(tabId).then((factor) => {
+ return browser.tabs.getZoom(tabId).then((factor) => {
for (let f of [].concat(ZOOM_SETTINGS).reverse()) {
if (f < factor) {
browser.tabs.setZoom(tabId, f);
@@ -32,7 +32,7 @@ const zoomOut = (tabId = undefined) => {
};
const neutral = (tabId = undefined) => {
- browser.tabs.setZoom(tabId, 1);
+ return browser.tabs.setZoom(tabId, 1);
};
export { zoomIn, zoomOut, neutral };