- onenote.git
- src
- electron
- window
- onenote
- ipc
- handler.js
This file ( 1kB ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
const { ipcRenderer } =require('electron');
const setProxy = require('../action/set-proxy');
const multiActions = require('../action/multi-actions');
const handler = (options) => {
const { webview } = options;
ipcRenderer.on('p3x-onenote-onload-user', function(event, data) {
if (data !== null) {
global.p3x.onenote.data = data;
}
//console.log('p3x-onenote-onload-user', data)
if (typeof(global.p3x.onenote.data) === 'object' && global.p3x.onenote.data.hasOwnProperty('url') && global.p3x.onenote.data.url !== 'about:blank') {
webview.src = global.p3x.onenote.data.url;
} else {
webview.src = 'https://www.onenote.com/notebooks'
}
if (global.p3x.onenote.data.proxy.trim() !== '') {
require('../action/load-proxy')();
}
})
ipcRenderer.on('p3x-onenote-action', function(event, data) {
multiActions(data);
})
ipcRenderer.on('p3x-onenote-action-set-proxy', (event, data) => {
setProxy(data);
})
}
module.exports = handler