Mostly import fixes
This commit is contained in:
parent
54c4f49edb
commit
a71b99ff10
@ -1,14 +1,14 @@
|
|||||||
import Debug from './conf/Debug';
|
import Debug from '@src/ext/conf/Debug';
|
||||||
import Settings from './module/settings/Settings';
|
import CommsClient from '@src/ext/module/comms/CommsClient';
|
||||||
import CommsClient from './module/comms/CommsClient';
|
import EventBus from '@src/ext/module/EventBus';
|
||||||
import PageInfo from './module/video-data/PageInfo';
|
import KeyboardHandler from '@src/ext/module/kbm/KeyboardHandler';
|
||||||
import EventBus from './module/EventBus';
|
import { ComponentLogger } from '@src/ext/module/logging/ComponentLogger';
|
||||||
import KeyboardHandler from './module/kbm/KeyboardHandler';
|
import { BLANK_LOGGER_CONFIG, LogAggregator } from '@src/ext/module/logging/LogAggregator';
|
||||||
import { SiteSettings } from './module/settings/SiteSettings';
|
import Settings from '@src/ext/module/settings/Settings';
|
||||||
import UI from './module/uwui/UI';
|
import { SiteSettings } from '@src/ext/module/settings/SiteSettings';
|
||||||
import { BLANK_LOGGER_CONFIG, LogAggregator } from './module/logging/LogAggregator';
|
import UI from '@src/ext/module/uwui/UI';
|
||||||
import { ComponentLogger } from './module/logging/ComponentLogger';
|
import PageInfo from '@src/ext/module/video-data/PageInfo';
|
||||||
import { getIframeParentHost, setupHostnameReporting } from './util/getHost';
|
import { getIframeParentHost, setupHostnameReporting } from '@src/ext/util/getHost';
|
||||||
|
|
||||||
export default class UWContent {
|
export default class UWContent {
|
||||||
pageInfo: PageInfo;
|
pageInfo: PageInfo;
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
import Debug from './conf/Debug.js';
|
|
||||||
import BrowserDetect from './conf/BrowserDetect';
|
|
||||||
import CommsServer from './module/comms/CommsServer.js';
|
|
||||||
import Settings from './module/settings/Settings.js';
|
|
||||||
import { sleep } from '../common/js/utils';
|
|
||||||
import { ComponentLogger } from './module/logging/ComponentLogger.js';
|
|
||||||
import { BLANK_LOGGER_CONFIG, LogAggregator } from './module/logging/LogAggregator.js';
|
|
||||||
import { Runtime } from 'chrome';
|
import { Runtime } from 'chrome';
|
||||||
import EventBus from '@src/ext/module/EventBus.js';
|
import EventBus from '@src/ext/module/EventBus';
|
||||||
|
import Settings from '@src/ext/module/settings/Settings';
|
||||||
|
import { ComponentLogger } from '@src/ext/module/logging/ComponentLogger';
|
||||||
|
import { BLANK_LOGGER_CONFIG, LogAggregator } from '@src/ext/module/logging/LogAggregator';
|
||||||
|
import CommsServer from '@src/ext/module/comms/CommsServer';
|
||||||
|
|
||||||
|
|
||||||
const BASE_LOGGING_STYLES = {
|
const BASE_LOGGING_STYLES = {
|
||||||
|
|||||||
@ -1,20 +1,15 @@
|
|||||||
// How to use:
|
// How to use:
|
||||||
// version: {ExtensionConf object, but only properties that get overwritten}
|
// version: {ExtensionConf object, but only properties that get overwritten}
|
||||||
import StretchType from '../../common/enums/StretchType.enum';
|
import AspectRatioType from '@src/common/enums/AspectRatioType.enum';
|
||||||
// import ExtensionMode from '../../common/enums/ExtensionMode.enum';
|
import CropModePersistence from '@src/common/enums/CropModePersistence.enum';
|
||||||
import VideoAlignmentType from '../../common/enums/VideoAlignmentType.enum';
|
import EmbeddedContentSettingsOverridePolicy from '@src/common/enums/EmbeddedContentSettingsOverridePolicy.enum';
|
||||||
import BrowserDetect from './BrowserDetect';
|
import ExtensionMode from '@src/common/enums/ExtensionMode.enum';
|
||||||
import SettingsInterface, { SiteSettingsInterface } from '../../common/interfaces/SettingsInterface';
|
import { InputHandlingMode } from '@src/common/enums/InputHandlingMode.enum';
|
||||||
import { _cp } from '../../common/js/utils';
|
import LegacyExtensionMode from '@src/common/enums/LegacyExtensionMode.enum';
|
||||||
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
|
import { PlayerDetectionMode } from '@src/common/enums/PlayerDetectionMode.enum';
|
||||||
import AspectRatioType from '../../common/enums/AspectRatioType.enum';
|
import { SiteSupportLevel } from '@src/common/enums/SiteSupportLevel.enum';
|
||||||
|
import SettingsInterface from '@src/common/interfaces/SettingsInterface';
|
||||||
import { update } from 'lodash';
|
import { update } from 'lodash';
|
||||||
import EmbeddedContentSettingsOverridePolicy from '../../common/enums/EmbeddedContentSettingsOverridePolicy.enum';
|
|
||||||
import LegacyExtensionMode from '../../common/enums/LegacyExtensionMode.enum';
|
|
||||||
import ExtensionMode from '../../common/enums/ExtensionMode.enum';
|
|
||||||
import { PlayerDetectionMode } from '../../common/enums/PlayerDetectionMode.enum';
|
|
||||||
import { SiteSupportLevel } from '../../common/enums/SiteSupportLevel.enum';
|
|
||||||
import { InputHandlingMode } from '../../common/enums/InputHandlingMode.enum';
|
|
||||||
|
|
||||||
|
|
||||||
const ExtensionConfPatch = Object.freeze([
|
const ExtensionConfPatch = Object.freeze([
|
||||||
|
|||||||
@ -1,20 +1,16 @@
|
|||||||
import Debug from './Debug';
|
import AspectRatioType from '@src/common/enums/AspectRatioType.enum';
|
||||||
import currentBrowser from './BrowserDetect';
|
import CropModePersistence from '@src/common/enums/CropModePersistence.enum';
|
||||||
import VideoAlignmentType from '../../common/enums/VideoAlignmentType.enum';
|
import EmbeddedContentSettingsOverridePolicy from '@src/common/enums/EmbeddedContentSettingsOverridePolicy.enum';
|
||||||
import StretchType from '../../common/enums/StretchType.enum';
|
import ExtensionMode from '@src/common/enums/ExtensionMode.enum';
|
||||||
import ExtensionMode from '../../common/enums/ExtensionMode.enum';
|
import { InputHandlingMode } from '@src/common/enums/InputHandlingMode.enum';
|
||||||
import AntiGradientMode from '../../common/enums/AntiGradientMode.enum';
|
import { PlayerDetectionMode } from '@src/common/enums/PlayerDetectionMode.enum';
|
||||||
import AspectRatioType from '../../common/enums/AspectRatioType.enum';
|
import { SiteSupportLevel } from '@src/common/enums/SiteSupportLevel.enum';
|
||||||
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
|
import StretchType from '@src/common/enums/StretchType.enum';
|
||||||
import SettingsInterface from '../../common/interfaces/SettingsInterface';
|
import VideoAlignmentType from '@src/common/enums/VideoAlignmentType.enum';
|
||||||
import BrowserDetect from './BrowserDetect';
|
import SettingsInterface from '@src/common/interfaces/SettingsInterface';
|
||||||
import { Extension } from 'typescript';
|
import Debug from '@src/ext/conf/Debug';
|
||||||
import EmbeddedContentSettingsOverridePolicy from '../../common/enums/EmbeddedContentSettingsOverridePolicy.enum';
|
import { AardPollingOptions } from '@src/ext/module/aard/enums/aard-polling-options.enum';
|
||||||
import { AardPollingOptions } from '../module/aard/enums/aard-polling-options.enum';
|
import { AardSubtitleCropMode } from '@src/ext/module/aard/enums/aard-subtitle-crop-mode.enum';
|
||||||
import { AardSubtitleCropMode } from '../module/aard/enums/aard-subtitle-crop-mode.enum';
|
|
||||||
import { SiteSupportLevel } from '../../common/enums/SiteSupportLevel.enum';
|
|
||||||
import { PlayerDetectionMode } from '../../common/enums/PlayerDetectionMode.enum';
|
|
||||||
import { InputHandlingMode } from '../../common/enums/InputHandlingMode.enum';
|
|
||||||
|
|
||||||
if(Debug.debug)
|
if(Debug.debug)
|
||||||
console.log("Loading: ExtensionConf.js");
|
console.log("Loading: ExtensionConf.js");
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
* NOTE: we cannot get rid of this js file. I tried for 30 seconds and I couldn't get
|
* NOTE: we cannot get rid of this js file. I tried for 30 seconds and I couldn't get
|
||||||
* extension to work unless I kept this part of extension out of the ts file.
|
* extension to work unless I kept this part of extension out of the ts file.
|
||||||
*/
|
*/
|
||||||
import UWContent from './UWContent';
|
import UWContent from '@src/ext/UWContent';
|
||||||
|
|
||||||
if(process.env.CHANNEL !== 'stable'){
|
if(process.env.CHANNEL !== 'stable'){
|
||||||
|
|
||||||
|
|||||||
@ -275,7 +275,7 @@ const TAB_LOADOUT = {
|
|||||||
'import-export-settings',
|
'import-export-settings',
|
||||||
'debugging',
|
'debugging',
|
||||||
],
|
],
|
||||||
'ui': [
|
'ui-window': [
|
||||||
'window.site-extension-settings',
|
'window.site-extension-settings',
|
||||||
'window.player-element-settings',
|
'window.player-element-settings',
|
||||||
'autodetectionSettings',
|
'autodetectionSettings',
|
||||||
@ -337,7 +337,6 @@ export default defineComponent({
|
|||||||
selectedTab: undefined,
|
selectedTab: undefined,
|
||||||
BrowserDetect: BrowserDetect,
|
BrowserDetect: BrowserDetect,
|
||||||
preventClose: false,
|
preventClose: false,
|
||||||
siteSettings: null,
|
|
||||||
globalSettings: null,
|
globalSettings: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -345,6 +344,7 @@ export default defineComponent({
|
|||||||
'role',
|
'role',
|
||||||
'initialPath',
|
'initialPath',
|
||||||
'settings',
|
'settings',
|
||||||
|
'siteSettings',
|
||||||
'eventBus',
|
'eventBus',
|
||||||
'logger',
|
'logger',
|
||||||
'inPlayer',
|
'inPlayer',
|
||||||
@ -367,31 +367,22 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.generateTabs();
|
try {
|
||||||
this.settings.listenAfterChange(this.setDebugTabVisibility);
|
this.generateTabs();
|
||||||
|
this.settings.listenAfterChange(this.setDebugTabVisibility);
|
||||||
|
|
||||||
this.setInitialPath();
|
this.setInitialPath();
|
||||||
const changelogTab = this.tabs.find(x => x.id === 'changelog');
|
const changelogTab = this.tabs.find(x => x.id === 'changelog');
|
||||||
if (changelogTab) {
|
if (changelogTab) {
|
||||||
changelogTab.highlight = !this.settings.active?.whatsNewChecked;
|
changelogTab.highlight = !this.settings.active?.whatsNewChecked;
|
||||||
}
|
|
||||||
|
|
||||||
this.globalSettings = this.settings.getSiteSettings({site: '@global'});
|
|
||||||
if (this.site) {
|
|
||||||
this.siteSettings = this.settings.getSiteSettings({site: this.site});
|
|
||||||
}
|
|
||||||
this.eventBus?.subscribe(
|
|
||||||
'uw-show-ui',
|
|
||||||
{
|
|
||||||
source: this,
|
|
||||||
function: () => {
|
|
||||||
if (this.inPlayer) {
|
|
||||||
return; // show-ui is only intended for global overlay
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
)
|
|
||||||
this.setDebugTabVisibility();
|
this.globalSettings = this.settings.getSiteSettings({site: '@global'});
|
||||||
|
this.setDebugTabVisibility();
|
||||||
|
} catch (e) {
|
||||||
|
console.error(`[ultrawidify|SettingsWindowContent.vue] created() crashed. Error:`, e);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
this.settings.removeListenerAfterChange(this.setDebugTabVisibility);
|
this.settings.removeListenerAfterChange(this.setDebugTabVisibility);
|
||||||
@ -399,11 +390,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* Regenerates this.siteSettings
|
* Regenerates relevant tabs
|
||||||
*/
|
*/
|
||||||
updateSite(newSite: {host: string, hostnames: string[],}) {
|
updateSite(newSite: {host: string, hostnames: string[],}) {
|
||||||
this.siteSettings = this.settings.getSiteSettings({site: newSite.host});
|
|
||||||
|
|
||||||
this.generateTabs(newSite);
|
this.generateTabs(newSite);
|
||||||
|
|
||||||
this.$nextTick( () => this.$forceUpdate());
|
this.$nextTick( () => this.$forceUpdate());
|
||||||
|
|||||||
@ -388,13 +388,6 @@ export default defineComponent({
|
|||||||
comms: {forwardTo: 'active'}
|
comms: {forwardTo: 'active'}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.eventBus.sendToTunnel(
|
|
||||||
'get-current-site',
|
|
||||||
{},
|
|
||||||
{
|
|
||||||
comms: {forwardTo: 'active'}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logger.log('error','popup','[popup::getSite] sending get-current-site failed for some reason. Reason:', e);
|
this.logger.log('error','popup','[popup::getSite] sending get-current-site failed for some reason. Reason:', e);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* extension to work unless I kept this part of extension out of the ts file.
|
* extension to work unless I kept this part of extension out of the ts file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import UWServer from './ext/UWServer';
|
import UWServer from '@src/ext/UWServer';
|
||||||
|
|
||||||
var BgVars = {
|
var BgVars = {
|
||||||
arIsActive: true,
|
arIsActive: true,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user