aboutsummaryrefslogtreecommitdiff
path: root/src/background/zooms.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-08-23 22:01:29 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-08-23 22:01:29 +0900
commita5f1e06efcc64c181f2e06337e47e4705aebabb8 (patch)
tree0cc73b8fb885c6c7f4eeda908c5147fc64606557 /src/background/zooms.js
parent1f15d2264305a5492f3f95d9fbdaf1e31fbb33fd (diff)
support zz command
Diffstat (limited to 'src/background/zooms.js')
-rw-r--r--src/background/zooms.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/background/zooms.js b/src/background/zooms.js
index def2878..bb65030 100644
--- a/src/background/zooms.js
+++ b/src/background/zooms.js
@@ -18,7 +18,7 @@ const zoomIn = (tabId = undefined) => {
}
}
});
-}
+};
const zoomOut = (tabId = undefined) => {
browser.tabs.getZoom(tabId).then((factor) => {
@@ -29,6 +29,10 @@ const zoomOut = (tabId = undefined) => {
}
}
});
-}
+};
-export { zoomIn, zoomOut };
+const neutral = (tabId = undefined) => {
+ browser.tabs.setZoom(tabId, 1);
+};
+
+export { zoomIn, zoomOut, neutral };