Update inject.js (#252)

* Special case hbogo.* inject (same as Amazon)

Closes: https://github.com/igrigorik/videospeed/issues/199
This commit is contained in:
mariusi7
2017-08-08 18:07:25 +03:00
committed by Ilya Grigorik
parent 8e2cf853a5
commit 2818103c7d

View File

@@ -149,13 +149,14 @@ chrome.extension.sendMessage({}, function(response) {
this.video.classList.add('vsc-initialized');
this.video.dataset['vscid'] = this.id;
switch (location.hostname) {
case 'www.amazon.com':
switch (true) {
case (location.hostname == 'www.amazon.com'):
case (/www\.hbogo\./).test(location.hostname):
// insert before parent to bypass overlay
this.parent.parentElement.insertBefore(fragment, this.parent);
break;
case 'www.facebook.com':
case (location.hostname == 'www.facebook.com'):
// set stacking context to same as parent's parent.
// + default fallthrough
this.parent.style.zIndex = 'auto';