1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 07:24:13 +01:00

Default arguments ftw.

This commit is contained in:
Kris Maglione
2013-09-21 16:57:09 -07:00
parent 25aae2cc99
commit 35784406a0
8 changed files with 14 additions and 30 deletions

View File

@@ -377,10 +377,7 @@ var StatusLine = Module("statusline", {
* @param {number} percent The zoom level, as a percentage. @optional
* @param {boolean} full True if full zoom is in operation. @optional
*/
updateZoomLevel: function updateZoomLevel(percent, full) {
if (arguments.length == 0)
[percent, full] = [buffer.zoomLevel, buffer.fullZoom];
updateZoomLevel: function updateZoomLevel(percent=buffer.zoomLevel, full=buffer.fullZoom) {
if (percent == 100)
this.widgets.zoomlevel.value = "";
else {