Merge pull request #9724 from electron/bump-standard-markdown
Bump standard-markdown
This commit is contained in:
commit
7587fc22f1
9 changed files with 6 additions and 9 deletions
|
@ -134,7 +134,7 @@ Windowsでは、ファイルパスを取得するために、 `process.argv` を
|
||||||
`url` の `certificate` 検証に失敗したときに発生します。証明書を信頼するために`event.preventDefault()` と `callback(true)`をコールして既定の動作を止める必要があります。
|
`url` の `certificate` 検証に失敗したときに発生します。証明書を信頼するために`event.preventDefault()` と `callback(true)`をコールして既定の動作を止める必要があります。
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
session.on('certificate-error', function (event, webContents, url, error, certificate, callback) {
|
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
|
||||||
if (url === 'https://github.com') {
|
if (url === 'https://github.com') {
|
||||||
// Verification logic.
|
// Verification logic.
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
|
@ -76,7 +76,7 @@ app.on('ready', function () {
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
protocol.registerBufferProtocol('atom', function (request, callback) {
|
protocol.registerBufferProtocol('atom', function (request, callback) {
|
||||||
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
|
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
if (error) console.error('Failed to register protocol')
|
if (error) console.error('Failed to register protocol')
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,7 +20,6 @@ app.on('ready', function () {
|
||||||
appIcon.setToolTip('This is my application.')
|
appIcon.setToolTip('This is my application.')
|
||||||
appIcon.setContextMenu(contextMenu)
|
appIcon.setContextMenu(contextMenu)
|
||||||
})
|
})
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
__プラットフォームの制限:__
|
__プラットフォームの制限:__
|
||||||
|
|
|
@ -130,7 +130,7 @@ app.on('ready', () => {
|
||||||
const {protocol} = require('electron')
|
const {protocol} = require('electron')
|
||||||
|
|
||||||
protocol.registerBufferProtocol('atom', (request, callback) => {
|
protocol.registerBufferProtocol('atom', (request, callback) => {
|
||||||
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
|
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
if (error) console.error('Failed to register protocol')
|
if (error) console.error('Failed to register protocol')
|
||||||
})
|
})
|
||||||
|
|
|
@ -131,7 +131,6 @@ app.on('activate', function () {
|
||||||
|
|
||||||
// В этот файл Вы можете включить остальной код вашего главного процесса.
|
// В этот файл Вы можете включить остальной код вашего главного процесса.
|
||||||
// Вы также можете разложить его по отдельным файлам и подключить с помощью require.
|
// Вы также можете разложить его по отдельным файлам и подключить с помощью require.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Наконец, `index.html`, страница, которую Вы хотите показать:
|
Наконец, `index.html`, страница, которую Вы хотите показать:
|
||||||
|
|
|
@ -141,7 +141,6 @@ app.on('activate', () => {
|
||||||
// Bu sayfada, uygulamanızın spesifik main process kodlarını dahil edebilirsiniz.
|
// Bu sayfada, uygulamanızın spesifik main process kodlarını dahil edebilirsiniz.
|
||||||
// Aynı zamanda bu kodları ayrı dosyalar halinde oluştura bilir
|
// Aynı zamanda bu kodları ayrı dosyalar halinde oluştura bilir
|
||||||
// ve buraya require yoluyla ekleye bilirsiniz.
|
// ve buraya require yoluyla ekleye bilirsiniz.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Son olarak `index.html` yani göstermek istediğiniz web sayfası:
|
Son olarak `index.html` yani göstermek istediğiniz web sayfası:
|
||||||
|
|
|
@ -124,7 +124,7 @@ app.on('ready', () => {
|
||||||
const {protocol} = require('electron')
|
const {protocol} = require('electron')
|
||||||
|
|
||||||
protocol.registerBufferProtocol('atom', (request, callback) => {
|
protocol.registerBufferProtocol('atom', (request, callback) => {
|
||||||
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
|
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
if (error) console.error('Failed to register protocol')
|
if (error) console.error('Failed to register protocol')
|
||||||
})
|
})
|
||||||
|
|
|
@ -137,7 +137,7 @@ Example:
|
||||||
const {protocol} = require('electron')
|
const {protocol} = require('electron')
|
||||||
|
|
||||||
protocol.registerBufferProtocol('atom', (request, callback) => {
|
protocol.registerBufferProtocol('atom', (request, callback) => {
|
||||||
callback({mimeType: 'text/html', data: new Buffer('<h5>Response</h5>')})
|
callback({mimeType: 'text/html', data: Buffer.from('<h5>Response</h5>')})
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
if (error) console.error('Failed to register protocol')
|
if (error) console.error('Failed to register protocol')
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"electron-typescript-definitions": "^1.2.7",
|
"electron-typescript-definitions": "^1.2.7",
|
||||||
"request": "^2.68.0",
|
"request": "^2.68.0",
|
||||||
"standard": "^8.4.0",
|
"standard": "^8.4.0",
|
||||||
"standard-markdown": "^2.1.1"
|
"standard-markdown": "^4.0.0"
|
||||||
},
|
},
|
||||||
"standard": {
|
"standard": {
|
||||||
"ignore": [
|
"ignore": [
|
||||||
|
|
Loading…
Add table
Reference in a new issue