Fix crashes in chrome

This commit is contained in:
Tamius Han 2023-10-21 17:41:09 +02:00
parent f7e36619df
commit 6062094e6f
2 changed files with 10 additions and 3 deletions

View File

@ -395,7 +395,7 @@ class VideoData {
this.video.classList.remove(this.baseCssName); this.video.classList.remove(this.baseCssName);
this.video.classList.remove(this.userCssClassName); this.video.classList.remove(this.userCssClassName);
if (!options.fromPlayer) { if (!options?.fromPlayer) {
this.player?.disable(); this.player?.disable();
} }
} }

View File

@ -8,6 +8,9 @@ const { VueLoaderPlugin } = require('vue-loader');
const path = require('path'); const path = require('path');
const config = { const config = {
watchOptions: {
ignored: /node_modules/
},
mode: process.env.NODE_ENV, mode: process.env.NODE_ENV,
devtool: `${process.env.CHANNEL === 'stable' ? undefined : "inline-source-map"}`, devtool: `${process.env.CHANNEL === 'stable' ? undefined : "inline-source-map"}`,
context: __dirname + '/src', context: __dirname + '/src',
@ -176,8 +179,12 @@ const config = {
if (process.env.BROWSER !== 'firefox') { if (process.env.BROWSER !== 'firefox') {
jsonContent.version = jsonContent.version.replace(/[a-zA-Z-]/g, ''); jsonContent.version = jsonContent.version.replace(/[a-zA-Z-]/g, '');
delete jsonContent.options_ui.browser_style; try {
delete jsonContent.background.scripts; delete jsonContent.options_ui.browser_style;
} catch (e) { }
try {
delete jsonContent.background.scripts;
} catch (e) {}
} else { } else {
delete jsonContent.background.service_worker; delete jsonContent.background.service_worker;
} }