logger import reordering
This commit is contained in:
parent
7ac5e17415
commit
59df28029f
@ -5,12 +5,12 @@ import ExtensionMode from '../../common/enums/extension-mode.enum';
|
||||
class ActionHandler {
|
||||
|
||||
constructor(pageInfo) {
|
||||
this.logger = pageInfo.logger;
|
||||
this.pageInfo = pageInfo;
|
||||
this.settings = pageInfo.settings;
|
||||
|
||||
this.inputs = ['input', 'select', 'button', 'textarea'];
|
||||
this.keyboardLocalDisabled = false;
|
||||
this.logger = pageInfo.logger;
|
||||
}
|
||||
|
||||
init() {
|
||||
|
@ -13,6 +13,7 @@ class Settings {
|
||||
|
||||
constructor(options) {
|
||||
// Options: activeSettings, updateCallback, logger
|
||||
this.logger = options.logger;
|
||||
const activeSettings = options.activeSettings;
|
||||
const updateCallback = options.updateCallback;
|
||||
|
||||
@ -22,7 +23,6 @@ class Settings {
|
||||
this.useSync = false;
|
||||
this.version = undefined;
|
||||
this.updateCallback = updateCallback;
|
||||
this.logger = options.logger;
|
||||
|
||||
const ths = this;
|
||||
|
||||
|
@ -3,6 +3,7 @@ import BrowserDetect from '../../conf/BrowserDetect';
|
||||
|
||||
class CommsClient {
|
||||
constructor(name, settings, logger) {
|
||||
this.logger = logger;
|
||||
if (BrowserDetect.firefox) {
|
||||
this.port = browser.runtime.connect({name: name});
|
||||
} else if (BrowserDetect.chrome) {
|
||||
@ -18,7 +19,6 @@ class CommsClient {
|
||||
this.settings = settings;
|
||||
this.pageInfo = undefined;
|
||||
this.commsId = (Math.random() * 20).toFixed(0);
|
||||
this.logger = logger;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
|
@ -10,6 +10,7 @@ if(Debug.debug)
|
||||
|
||||
class PageInfo {
|
||||
constructor(comms, settings, logger, extensionMode, readOnly = false){
|
||||
this.logger = logger;
|
||||
this.hasVideos = false;
|
||||
this.siteDisabled = false;
|
||||
this.videos = [];
|
||||
@ -20,7 +21,6 @@ class PageInfo {
|
||||
this.extensionMode = extensionMode;
|
||||
this.readOnly = readOnly;
|
||||
|
||||
this.logger = logger;
|
||||
|
||||
if (comms){
|
||||
this.comms = comms;
|
||||
|
@ -34,6 +34,7 @@ if(Debug.debug)
|
||||
|
||||
class PlayerData {
|
||||
constructor(videoData) {
|
||||
this.logger = videoData.logger;
|
||||
this.videoData = videoData;
|
||||
this.video = videoData.video;
|
||||
this.settings = videoData.settings;
|
||||
@ -41,7 +42,6 @@ class PlayerData {
|
||||
this.element = undefined;
|
||||
this.dimensions = undefined;
|
||||
this.overlayNode = undefined;
|
||||
this.logger = videoData.logger;
|
||||
|
||||
this.observer = new MutationObserver(this.onPlayerDimensionsChanged);
|
||||
|
||||
|
@ -6,13 +6,13 @@ import ArDetector from '../ar-detect/ArDetector';
|
||||
class VideoData {
|
||||
|
||||
constructor(video, settings, pageInfo){
|
||||
this.logger = pageInfo.logger;
|
||||
this.arSetupComplete = false;
|
||||
this.video = video;
|
||||
this.destroyed = false;
|
||||
this.settings = settings;
|
||||
this.pageInfo = pageInfo;
|
||||
this.extensionMode = pageInfo.extensionMode;
|
||||
this.logger = pageInfo.logger;
|
||||
|
||||
this.vdid = (Math.random()*100).toFixed();
|
||||
this.userCssClassName = `uw-fuck-you-and-do-what-i-tell-you_${this.vdid}`;
|
||||
|
@ -16,11 +16,11 @@ class Resizer {
|
||||
|
||||
constructor(videoData) {
|
||||
this.conf = videoData;
|
||||
this.logger = videoData.logger;
|
||||
this.video = videoData.video;
|
||||
this.settings = videoData.settings;
|
||||
this.extensionMode = videoData.extensionMode;
|
||||
|
||||
this.logger = videoData.logger;
|
||||
|
||||
this.scaler = new Scaler(this.conf);
|
||||
this.stretcher = new Stretcher(this.conf);
|
||||
|
@ -12,9 +12,9 @@ class Stretcher {
|
||||
// functions
|
||||
constructor(videoData) {
|
||||
this.conf = videoData;
|
||||
this.logger = videoData.logger;
|
||||
this.settings = videoData.settings;
|
||||
this.mode = this.settings.getDefaultStretchMode(window.location.hostname);
|
||||
this.logger = videoData.logger;
|
||||
}
|
||||
|
||||
setStretchMode(stretchMode) {
|
||||
|
@ -6,13 +6,14 @@ import Debug from '../../conf/Debug';
|
||||
class Zoom {
|
||||
// functions
|
||||
constructor(videoData) {
|
||||
this.conf = videoData;
|
||||
this.logger = videoData.logger;
|
||||
|
||||
this.scale = 1;
|
||||
this.logScale = 0;
|
||||
this.scaleStep = 0.1;
|
||||
this.minScale = -1; // 50% (log2(0.5) = -1)
|
||||
this.maxScale = 3; // 800% (log2(8) = 3)
|
||||
this.conf = videoData;
|
||||
this.logger = videoData.logger;
|
||||
}
|
||||
|
||||
reset(){
|
||||
|
@ -65,8 +65,8 @@ class UW {
|
||||
'arDetect_verbose': false,
|
||||
}
|
||||
};
|
||||
// this.logger = new Logger(this.settings.getLoggingOptions);
|
||||
this.logger = new Logger(loggingOptions);
|
||||
// await this.logger.init(); // not needed if logging options are provided at creation
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("logger init failed!", e)
|
||||
|
Loading…
Reference in New Issue
Block a user