diff --git a/src/ext/lib/ActionHandler.js b/src/ext/lib/ActionHandler.js index 803e0ce..aeccbbc 100644 --- a/src/ext/lib/ActionHandler.js +++ b/src/ext/lib/ActionHandler.js @@ -4,13 +4,13 @@ import ExtensionMode from '../../common/enums/extension-mode.enum'; class ActionHandler { - constructor(pageInfo, logger) { + constructor(pageInfo) { this.pageInfo = pageInfo; this.settings = pageInfo.settings; this.inputs = ['input', 'select', 'button', 'textarea']; this.keyboardLocalDisabled = false; - this.logger = logger; + this.logger = pageInfo.logger; } init() { diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 325c78f..3b8d747 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -22,9 +22,9 @@ class Resizer { this.logger = videoData.logger; - this.scaler = new Scaler(this.conf, logger); - this.stretcher = new Stretcher(this.conf, logger); - this.zoom = new Zoom(this.conf, logger); + this.scaler = new Scaler(this.conf); + this.stretcher = new Stretcher(this.conf); + this.zoom = new Zoom(this.conf); // load up default values this.correctedVideoDimensions = {}; diff --git a/src/ext/lib/video-transform/Scaler.js b/src/ext/lib/video-transform/Scaler.js index 38dacc6..4cb9ea6 100644 --- a/src/ext/lib/video-transform/Scaler.js +++ b/src/ext/lib/video-transform/Scaler.js @@ -9,9 +9,9 @@ class Scaler { // internal variables // functions - constructor(videoData, logger) { + constructor(videoData) { this.conf = videoData; - this.logger = logger; + this.logger = videoData.logger; } diff --git a/src/ext/lib/video-transform/Stretcher.js b/src/ext/lib/video-transform/Stretcher.js index 5cbfa9c..b916c4e 100644 --- a/src/ext/lib/video-transform/Stretcher.js +++ b/src/ext/lib/video-transform/Stretcher.js @@ -10,11 +10,11 @@ class Stretcher { // functions - constructor(videoData, logger) { + constructor(videoData) { this.conf = videoData; this.settings = videoData.settings; this.mode = this.settings.getDefaultStretchMode(window.location.hostname); - this.logger = logger; + this.logger = videoData.logger; } setStretchMode(stretchMode) { diff --git a/src/ext/lib/video-transform/Zoom.js b/src/ext/lib/video-transform/Zoom.js index 649b2fb..bf1baec 100644 --- a/src/ext/lib/video-transform/Zoom.js +++ b/src/ext/lib/video-transform/Zoom.js @@ -5,14 +5,14 @@ import Debug from '../../conf/Debug'; class Zoom { // functions - constructor(videoData, logger) { + constructor(videoData) { 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 = logger; + this.logger = videoData.logger; } reset(){ diff --git a/src/ext/uw.js b/src/ext/uw.js index db88dda..764b7aa 100644 --- a/src/ext/uw.js +++ b/src/ext/uw.js @@ -119,7 +119,7 @@ class UW { // start action handler only if extension is enabled for this site if (!isSiteDisabled) { - this.actionHandler = new ActionHandler(this.pageInfo, this.logger); + this.actionHandler = new ActionHandler(this.pageInfo); this.actionHandler.init(); this.logger.log('info', 'debug', "[uw.js::setup] ActionHandler initiated:", this.actionHandler);