From b1b3b2b36ae62f1c25b82644fa4df374b071c467 Mon Sep 17 00:00:00 2001 From: codebicycle Date: Sat, 6 Feb 2021 21:50:47 +0200 Subject: [PATCH] Revert to fix positioning issue --- inject.js | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inject.js b/inject.js index a2b21e3..3488b3d 100644 --- a/inject.js +++ b/inject.js @@ -274,8 +274,8 @@ function defineVideoController() { const document = this.video.ownerDocument; const speed = this.video.playbackRate.toFixed(2); const rect = this.video.getBoundingClientRect(); - const top = Math.max(rect.top, 0) + "px"; - const left = Math.max(rect.left, 0) + "px"; + var top = Math.max(this.video.offsetTop, 0) + "px", + left = Math.max(this.video.offsetLeft, 0) + "px"; log("Speed variable set to: " + speed, 5); diff --git a/manifest.json b/manifest.json index 8875843..c58f52f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Video Speed Controller", "short_name": "videospeed", - "version": "0.6.3", + "version": "0.6.3.1", "manifest_version": 2, "description": "Speed up, slow down, advance and rewind HTML5 audio/video with shortcuts", "homepage_url": "https://github.com/codebicycle/videospeed",