From 06caa1ebb10177b0845800dfe55314664dda5927 Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Sat, 14 May 2016 10:59:56 -0700 Subject: [PATCH] don't allow negative offsetTop --- inject.js | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inject.js b/inject.js index 81da5ff..cb461a0 100644 --- a/inject.js +++ b/inject.js @@ -95,7 +95,7 @@ chrome.extension.sendMessage({}, function(response) { container.classList.add('tc-videoController'); controls.classList.add('tc-controls'); - container.style.top = this.video.offsetTop+"px"; + container.style.top = Math.max(this.video.offsetTop,0)+"px"; fragment.appendChild(container); this.video.classList.add('tc-initialized'); diff --git a/manifest.json b/manifest.json index 45b17ac..c466d0a 100755 --- a/manifest.json +++ b/manifest.json @@ -29,7 +29,7 @@ "https://teamtreehouse.com/*", "https://www.instagram.com/*", "https://www.twitter.com/*", - "http://www.lynda.com/*", + "https://www.lynda.com/*", "http://www.hitbox.tv/*", "https://vine.co/*" ],