mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-02-03 12:18:25 +00:00
Fix linting errors
This commit is contained in:
parent
c12006ebea
commit
537dc01fd1
@ -129,16 +129,16 @@ function createMainWindow(options, onAppQuit, setDockBadge) {
|
|||||||
mainWindow.webContents.setUserAgent(options.userAgent);
|
mainWindow.webContents.setUserAgent(options.userAgent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const injectCss = () => {
|
||||||
|
mainWindow.webContents.insertCSS(getCssToInject());
|
||||||
|
};
|
||||||
|
|
||||||
mainWindow.webContents.on('did-finish-load', () => {
|
mainWindow.webContents.on('did-finish-load', () => {
|
||||||
mainWindow.webContents.send('params', JSON.stringify(options));
|
mainWindow.webContents.send('params', JSON.stringify(options));
|
||||||
// remove the injection of css the moment the page is loaded
|
// remove the injection of css the moment the page is loaded
|
||||||
mainWindow.webContents.removeListener('did-get-response-details', injectCss);
|
mainWindow.webContents.removeListener('did-get-response-details', injectCss);
|
||||||
});
|
});
|
||||||
|
|
||||||
const injectCss = () => {
|
|
||||||
mainWindow.webContents.insertCSS(getCssToInject());
|
|
||||||
}
|
|
||||||
|
|
||||||
// on every page navigation inject the css
|
// on every page navigation inject the css
|
||||||
mainWindow.webContents.on('did-start-loading', () => {
|
mainWindow.webContents.on('did-start-loading', () => {
|
||||||
// we have to inject the css in did-get-response-details to prevent the fouc
|
// we have to inject the css in did-get-response-details to prevent the fouc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user