@lvce-editor/main-process 6.32.1 → 6.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mainProcessMain.js +76 -38
- package/package.json +1 -1
package/dist/mainProcessMain.js
CHANGED
|
@@ -4076,6 +4076,7 @@ const WillNavigate = 'will-navigate';
|
|
|
4076
4076
|
const DidStartNavigation = 'did-start-navigation';
|
|
4077
4077
|
const DidNavigate = 'did-navigate';
|
|
4078
4078
|
const PageTitleUpdated = 'page-title-updated';
|
|
4079
|
+
const PageFaviconUpdated = 'page-favicon-updated';
|
|
4079
4080
|
const Destroyed = 'destroyed';
|
|
4080
4081
|
const BeforeInputEvent = 'before-input-event';
|
|
4081
4082
|
const Login = 'login';
|
|
@@ -5174,10 +5175,10 @@ const getWebContentsViewName = url => {
|
|
|
5174
5175
|
hostname
|
|
5175
5176
|
} = new URL(url);
|
|
5176
5177
|
if (hostname) {
|
|
5177
|
-
return `
|
|
5178
|
+
return `webcontentsview, ${hostname}`;
|
|
5178
5179
|
}
|
|
5179
5180
|
}
|
|
5180
|
-
return '
|
|
5181
|
+
return 'webcontentsview';
|
|
5181
5182
|
};
|
|
5182
5183
|
const createPidMap = () => {
|
|
5183
5184
|
const browserWindows = BrowserWindow.getAllWindows();
|
|
@@ -6250,14 +6251,14 @@ const handleWebContentsViewZoomKeyBinding = (webContentsId, input) => {
|
|
|
6250
6251
|
return true;
|
|
6251
6252
|
};
|
|
6252
6253
|
|
|
6253
|
-
const key$
|
|
6254
|
-
const attach$
|
|
6254
|
+
const key$8 = 'before-input';
|
|
6255
|
+
const attach$9 = (webContents, listener) => {
|
|
6255
6256
|
webContents.on(BeforeInputEvent, listener);
|
|
6256
6257
|
};
|
|
6257
|
-
const detach$
|
|
6258
|
+
const detach$8 = (webContents, listener) => {
|
|
6258
6259
|
webContents.off(BeforeInputEvent, listener);
|
|
6259
6260
|
};
|
|
6260
|
-
const handler$
|
|
6261
|
+
const handler$8 = (event, input, webContentsId) => {
|
|
6261
6262
|
if (input.type !== KeyDown) {
|
|
6262
6263
|
return {
|
|
6263
6264
|
messages: [],
|
|
@@ -6291,20 +6292,20 @@ const handler$7 = (event, input, webContentsId) => {
|
|
|
6291
6292
|
|
|
6292
6293
|
const ElectronBrowserViewEventListenerBeforeInput = {
|
|
6293
6294
|
__proto__: null,
|
|
6294
|
-
attach: attach$
|
|
6295
|
-
detach: detach$
|
|
6296
|
-
handler: handler$
|
|
6297
|
-
key: key$
|
|
6295
|
+
attach: attach$9,
|
|
6296
|
+
detach: detach$8,
|
|
6297
|
+
handler: handler$8,
|
|
6298
|
+
key: key$8
|
|
6298
6299
|
};
|
|
6299
6300
|
|
|
6300
|
-
const key$
|
|
6301
|
-
const attach$
|
|
6301
|
+
const key$7 = 'context-menu';
|
|
6302
|
+
const attach$8 = (webContents, listener) => {
|
|
6302
6303
|
webContents.on(ContextMenu, listener);
|
|
6303
6304
|
};
|
|
6304
|
-
const detach$
|
|
6305
|
+
const detach$7 = (webContents, listener) => {
|
|
6305
6306
|
webContents.off(ContextMenu, listener);
|
|
6306
6307
|
};
|
|
6307
|
-
const handler$
|
|
6308
|
+
const handler$7 = (event, params) => {
|
|
6308
6309
|
return {
|
|
6309
6310
|
messages: [['handleContextMenu', params]],
|
|
6310
6311
|
result: undefined
|
|
@@ -6313,20 +6314,20 @@ const handler$6 = (event, params) => {
|
|
|
6313
6314
|
|
|
6314
6315
|
const ElectronBrowserViewEventListenerContextMenu = {
|
|
6315
6316
|
__proto__: null,
|
|
6316
|
-
attach: attach$
|
|
6317
|
-
detach: detach$
|
|
6318
|
-
handler: handler$
|
|
6319
|
-
key: key$
|
|
6317
|
+
attach: attach$8,
|
|
6318
|
+
detach: detach$7,
|
|
6319
|
+
handler: handler$7,
|
|
6320
|
+
key: key$7
|
|
6320
6321
|
};
|
|
6321
6322
|
|
|
6322
|
-
const key$
|
|
6323
|
-
const attach$
|
|
6323
|
+
const key$6 = 'destroyed';
|
|
6324
|
+
const attach$7 = (webContents, listener) => {
|
|
6324
6325
|
webContents.on(Destroyed, listener);
|
|
6325
6326
|
};
|
|
6326
|
-
const detach$
|
|
6327
|
+
const detach$6 = (webContents, listener) => {
|
|
6327
6328
|
webContents.off(Destroyed, listener);
|
|
6328
6329
|
};
|
|
6329
|
-
const handler$
|
|
6330
|
+
const handler$6 = () => {
|
|
6330
6331
|
return {
|
|
6331
6332
|
messages: [['handleBrowserViewDestroyed']],
|
|
6332
6333
|
result: undefined
|
|
@@ -6335,20 +6336,20 @@ const handler$5 = () => {
|
|
|
6335
6336
|
|
|
6336
6337
|
const ElectronBrowserViewEventListenerDestroyed = {
|
|
6337
6338
|
__proto__: null,
|
|
6338
|
-
attach: attach$
|
|
6339
|
-
detach: detach$
|
|
6340
|
-
handler: handler$
|
|
6341
|
-
key: key$
|
|
6339
|
+
attach: attach$7,
|
|
6340
|
+
detach: detach$6,
|
|
6341
|
+
handler: handler$6,
|
|
6342
|
+
key: key$6
|
|
6342
6343
|
};
|
|
6343
6344
|
|
|
6344
|
-
const key$
|
|
6345
|
-
const attach$
|
|
6345
|
+
const key$5 = 'did-navigate';
|
|
6346
|
+
const attach$6 = (webContents, listener) => {
|
|
6346
6347
|
webContents.on(DidNavigate, listener);
|
|
6347
6348
|
};
|
|
6348
|
-
const detach$
|
|
6349
|
+
const detach$5 = (webContents, listener) => {
|
|
6349
6350
|
webContents.off(DidNavigate, listener);
|
|
6350
6351
|
};
|
|
6351
|
-
const handler$
|
|
6352
|
+
const handler$5 = (event, url) => {
|
|
6352
6353
|
return {
|
|
6353
6354
|
messages: [['handleDidNavigate', url]],
|
|
6354
6355
|
result: undefined
|
|
@@ -6357,10 +6358,10 @@ const handler$4 = (event, url) => {
|
|
|
6357
6358
|
|
|
6358
6359
|
const ElectronBrowserViewEventListenerDidNavigate = {
|
|
6359
6360
|
__proto__: null,
|
|
6360
|
-
attach: attach$
|
|
6361
|
-
detach: detach$
|
|
6362
|
-
handler: handler$
|
|
6363
|
-
key: key$
|
|
6361
|
+
attach: attach$6,
|
|
6362
|
+
detach: detach$5,
|
|
6363
|
+
handler: handler$5,
|
|
6364
|
+
key: key$5
|
|
6364
6365
|
};
|
|
6365
6366
|
|
|
6366
6367
|
const pendingLogins = new Map();
|
|
@@ -6396,14 +6397,14 @@ const cancelForWebContents = webContentsId => {
|
|
|
6396
6397
|
}
|
|
6397
6398
|
};
|
|
6398
6399
|
|
|
6399
|
-
const key$
|
|
6400
|
-
const attach$
|
|
6400
|
+
const key$4 = Login;
|
|
6401
|
+
const attach$5 = (webContents, listener) => {
|
|
6401
6402
|
webContents.on(Login, listener);
|
|
6402
6403
|
};
|
|
6403
|
-
const detach$
|
|
6404
|
+
const detach$4 = (webContents, listener) => {
|
|
6404
6405
|
webContents.off(Login, listener);
|
|
6405
6406
|
};
|
|
6406
|
-
const handler$
|
|
6407
|
+
const handler$4 = (event, authenticationResponseDetails, authInfo, callback, webContentsId) => {
|
|
6407
6408
|
event.preventDefault();
|
|
6408
6409
|
const requestId = add(webContentsId, callback);
|
|
6409
6410
|
return {
|
|
@@ -6421,6 +6422,28 @@ const handler$3 = (event, authenticationResponseDetails, authInfo, callback, web
|
|
|
6421
6422
|
};
|
|
6422
6423
|
|
|
6423
6424
|
const ElectronBrowserViewEventListenerLogin = {
|
|
6425
|
+
__proto__: null,
|
|
6426
|
+
attach: attach$5,
|
|
6427
|
+
detach: detach$4,
|
|
6428
|
+
handler: handler$4,
|
|
6429
|
+
key: key$4
|
|
6430
|
+
};
|
|
6431
|
+
|
|
6432
|
+
const key$3 = PageFaviconUpdated;
|
|
6433
|
+
const attach$4 = (webContents, listener) => {
|
|
6434
|
+
webContents.on(PageFaviconUpdated, listener);
|
|
6435
|
+
};
|
|
6436
|
+
const detach$3 = (webContents, listener) => {
|
|
6437
|
+
webContents.off(PageFaviconUpdated, listener);
|
|
6438
|
+
};
|
|
6439
|
+
const handler$3 = (event, favicons) => {
|
|
6440
|
+
return {
|
|
6441
|
+
messages: [['handlePageFaviconUpdated', favicons]],
|
|
6442
|
+
result: undefined
|
|
6443
|
+
};
|
|
6444
|
+
};
|
|
6445
|
+
|
|
6446
|
+
const ElectronBrowserViewEventListenerPageFaviconUpdated = {
|
|
6424
6447
|
__proto__: null,
|
|
6425
6448
|
attach: attach$4,
|
|
6426
6449
|
detach: detach$3,
|
|
@@ -6508,6 +6531,7 @@ const ElectronBrowserViewEventListeners = {
|
|
|
6508
6531
|
destroyed: ElectronBrowserViewEventListenerDestroyed,
|
|
6509
6532
|
didNavigate: ElectronBrowserViewEventListenerDidNavigate,
|
|
6510
6533
|
login: ElectronBrowserViewEventListenerLogin,
|
|
6534
|
+
pageFaviconUpdated: ElectronBrowserViewEventListenerPageFaviconUpdated,
|
|
6511
6535
|
pageTitleUpdated: ElectronBrowserViewEventListenerPageTitleUpdated,
|
|
6512
6536
|
willNavigate: ElectronBrowserViewEventListenerWillNavigate,
|
|
6513
6537
|
windowOpen: ElectronBrowserViewEventListenerWindowOpen
|
|
@@ -6537,6 +6561,16 @@ const cancelIfStartsWith = (url, canceledUrls) => {
|
|
|
6537
6561
|
}
|
|
6538
6562
|
return {};
|
|
6539
6563
|
};
|
|
6564
|
+
const canceledAdUrls = ['https://c.amazon-adsystem.com/', 'https://cadmus.script.ac/', 'https://config.aps.amazon-adsystem.com/', 'https://dn0qt3r0xannq.cloudfront.net/', 'https://edge.aditude.io/', 'https://ep1.adtrafficquality.google/', 'https://event-ingestor.judy.pnap.aditude.cloud/', 'https://pagead2.googlesyndication.com/', 'https://raven-static.aditude.io/', 'https://securepubads.g.doubleclick.net/'];
|
|
6565
|
+
const safeframeUrlRegex = /^https:\/\/[^/]+\.safeframe\.googlesyndication\.com\//;
|
|
6566
|
+
const getBeforeRequestResponseAd = url => {
|
|
6567
|
+
if (safeframeUrlRegex.test(url)) {
|
|
6568
|
+
return {
|
|
6569
|
+
cancel: true
|
|
6570
|
+
};
|
|
6571
|
+
}
|
|
6572
|
+
return cancelIfStartsWith(url, canceledAdUrls);
|
|
6573
|
+
};
|
|
6540
6574
|
const getBeforeRequestResponseXhrPost = url => {
|
|
6541
6575
|
const canceledUrls = ['https://www.youtube.com/api/stats/qoe', 'https://www.youtube.com/youtubei/v1/log_event', 'https://play.google.com/log'];
|
|
6542
6576
|
return cancelIfStartsWith(url, canceledUrls);
|
|
@@ -6580,6 +6614,10 @@ const getBeforeRequestResponse = details => {
|
|
|
6580
6614
|
resourceType,
|
|
6581
6615
|
url
|
|
6582
6616
|
} = details;
|
|
6617
|
+
const adResponse = getBeforeRequestResponseAd(url);
|
|
6618
|
+
if (adResponse.cancel) {
|
|
6619
|
+
return adResponse;
|
|
6620
|
+
}
|
|
6583
6621
|
switch (resourceType) {
|
|
6584
6622
|
case MainFrame:
|
|
6585
6623
|
return getBeforeRequestResponseMainFrame();
|