Commit 282accfd authored by akiraohgaki's avatar akiraohgaki

Merge branch 'develop'

parents c9f7ec03 0a97ff2e
Pipeline #338 passed with stage
in 2 minutes and 6 seconds
......@@ -116,9 +116,7 @@ export default class WebviewComponent extends BaseComponent {
this._webview.openDevTools();
}
//this._webview.send('ipc-message');
this._webview.send('smooth-scroll');
this._webview.send('ipc-message');
});
this._webview.addEventListener('new-window', (event) => {
......
const {ipcRenderer} = require('electron');
ipcRenderer.on('smooth-scroll', () => {
function applySmoothScroll() {
let timeoutId = null;
let deltaX = 0;
let deltaY = 0;
......@@ -25,15 +25,20 @@ ipcRenderer.on('smooth-scroll', () => {
}, 150);
}
});
});
}
/*
ipcRenderer.on('user-profile', () => {
function detectUserProfile() {
const profileMenu = document.querySelector('[rel="profile-menu"]');
if (profileMenu) {
const userName = profileMenu.querySelector('span').innerHTML;
const userImage = profileMenu.querySelector('img').src;
ipcRenderer.sendToHost('user-profile', userName, userImage);
}
});
}
*/
ipcRenderer.on('ipc-message', () => {
applySmoothScroll();
//detectUserProfile();
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment