auto-standardize javascript in docs-translations

This commit is contained in:
Zeke Sikelianos 2016-10-02 20:47:16 -07:00
parent 2e4322c230
commit 4ae6103356
108 changed files with 1213 additions and 1213 deletions

View file

@ -14,11 +14,11 @@
```javascript
let myNotification = new Notification('Title', {
body: 'Lorem Ipsum Dolor Sit Amet'
});
})
myNotification.onclick = () => {
console.log('Notification clicked');
};
console.log('Notification clicked')
}
```
オペレーティングシステム間でコードとユーザ体験は似ていますが、細かい違いがあります。
@ -57,13 +57,13 @@ __Application dock menu:__
最近のドキュメントにファイルを追加するために、[app.addRecentDocument][addrecentdocument] APIを使用できます:
```javascript
app.addRecentDocument('/Users/USERNAME/Desktop/work.type');
app.addRecentDocument('/Users/USERNAME/Desktop/work.type')
```
[app.clearRecentDocuments][clearrecentdocuments] API を使用して、最近のドキュメント一覧を空にできます:
```javascript
app.clearRecentDocuments();
app.clearRecentDocuments()
```
### Windows 留意点
@ -87,19 +87,19 @@ __Dock menu of Terminal.app:__
カスタムドックメニューを設定するために、macOSのみに提供されている `app.dock.setMenu` APIを使用できます。
```javascript
const electron = require('electron');
const app = electron.app;
const Menu = electron.Menu;
const electron = require('electron')
const app = electron.app
const Menu = electron.Menu
const dockMenu = Menu.buildFromTemplate([
{ label: 'New Window', click() { console.log('New Window'); } },
{ label: 'New Window', click () { console.log('New Window') } },
{ label: 'New Window with Settings', submenu: [
{ label: 'Basic' },
{ label: 'Pro'}
]},
{ label: 'New Command...'}
]);
app.dock.setMenu(dockMenu);
])
app.dock.setMenu(dockMenu)
```
## ユーザータスク (Windows)
@ -129,13 +129,13 @@ app.setUserTasks([
title: 'New Window',
description: 'Create a new window'
}
]);
])
```
タスクリストをクリアするために、`app.setUserTasks` をコールし、配列を空にします。
```javascript
app.setUserTasks([]);
app.setUserTasks([])
```
アプリケーションを閉じた後もユーザータスクは表示されていてるので、アプリケーションをアンインストールするまではタスクに指定したアイコンとプログラムのパスは存在し続けてる必要があります。
@ -156,32 +156,32 @@ __Windows Media Playerの縮小表示ツールバー:__
アプリケーションに縮小表示ツールバーを設定するために、[BrowserWindow.setThumbarButtons][setthumbarbuttons]を使えます:
```javascript
const {BrowserWindow} = require('electron');
const path = require('path');
const {BrowserWindow} = require('electron')
const path = require('path')
let win = new BrowserWindow({
width: 800,
height: 600
});
})
win.setThumbarButtons([
{
tooltip: 'button1',
icon: path.join(__dirname, 'button1.png'),
click() { console.log("button2 clicked"); }
click () { console.log('button2 clicked') }
},
{
tooltip: 'button2',
icon: path.join(__dirname, 'button2.png'),
flags: ['enabled', 'dismissonclick'],
click() { console.log("button2 clicked."); }
click () { console.log('button2 clicked.') }
}
]);
])
```
縮小表示ツールバーボタンをクリアするために、 `BrowserWindow.setThumbarButtons` をコールして配列を空にします:
```javascript
win.setThumbarButtons([]);
win.setThumbarButtons([])
```
## Unity ランチャーショートカット (Linux)