From: Hank Bao Date: Thu, 9 Jul 2015 14:49:16 +0000 (+0800) Subject: Fix sample code indention X-Git-Tag: v0.30.0~35^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=fc9612a5ed7e71dd02433b9a5ee8e16936356fe4;p=electron.git Fix sample code indention --- diff --git a/docs/api/global-shortcut.md b/docs/api/global-shortcut.md index d9a77ce6..16399cfb 100644 --- a/docs/api/global-shortcut.md +++ b/docs/api/global-shortcut.md @@ -10,25 +10,25 @@ var app = require('app'); var globalShortcut = require('global-shortcut'); app.on('ready', function() { - // Register a 'ctrl+x' shortcut listener. - var ret = globalShortcut.register('ctrl+x', function() { - console.log('ctrl+x is pressed'); - }) + // Register a 'ctrl+x' shortcut listener. + var ret = globalShortcut.register('ctrl+x', function() { + console.log('ctrl+x is pressed'); + }) - if (!ret) { - console.log('registration failed'); - } + if (!ret) { + console.log('registration failed'); + } - // Check whether a shortcut is registered. - console.log(globalShortcut.isRegistered('ctrl+x')); + // Check whether a shortcut is registered. + console.log(globalShortcut.isRegistered('ctrl+x')); }); app.on('will-quit', function() { - // Unregister a shortcut. - globalShortcut.unregister('ctrl+x'); + // Unregister a shortcut. + globalShortcut.unregister('ctrl+x'); - // Unregister all shortcuts. - globalShortcut.unregisterAll(); + // Unregister all shortcuts. + globalShortcut.unregisterAll(); }); ```