mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
Update inject.js (#252)
* Special case hbogo.* inject (same as Amazon) Closes: https://github.com/igrigorik/videospeed/issues/199
This commit is contained in:
@@ -149,13 +149,14 @@ chrome.extension.sendMessage({}, function(response) {
|
|||||||
this.video.classList.add('vsc-initialized');
|
this.video.classList.add('vsc-initialized');
|
||||||
this.video.dataset['vscid'] = this.id;
|
this.video.dataset['vscid'] = this.id;
|
||||||
|
|
||||||
switch (location.hostname) {
|
switch (true) {
|
||||||
case 'www.amazon.com':
|
case (location.hostname == 'www.amazon.com'):
|
||||||
|
case (/www\.hbogo\./).test(location.hostname):
|
||||||
// insert before parent to bypass overlay
|
// insert before parent to bypass overlay
|
||||||
this.parent.parentElement.insertBefore(fragment, this.parent);
|
this.parent.parentElement.insertBefore(fragment, this.parent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'www.facebook.com':
|
case (location.hostname == 'www.facebook.com'):
|
||||||
// set stacking context to same as parent's parent.
|
// set stacking context to same as parent's parent.
|
||||||
// + default fallthrough
|
// + default fallthrough
|
||||||
this.parent.style.zIndex = 'auto';
|
this.parent.style.zIndex = 'auto';
|
||||||
|
Reference in New Issue
Block a user