From a46539445762da6030bce2875f870edaa19682b9 Mon Sep 17 00:00:00 2001 From: Booteille Date: Sun, 17 Feb 2019 20:34:14 +0100 Subject: [PATCH] Use indexOf instead of strict equality to match the host --- src/youtube.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/youtube.ts b/src/youtube.ts index 3f17f0e..759dc1d 100644 --- a/src/youtube.ts +++ b/src/youtube.ts @@ -22,7 +22,7 @@ import { MessageKind, RedirectType } from './types'; import Preferences from './preferences' const thumbnailURL = (host, path) => `https://${host}${path}`; -const isYouTube = document.location.hostname === 'www.youtube.com'; +const isYouTube = document.location.hostname.indexOf('youtube.com') >= 0; const LINK_ID = 'peertube-link'; function searchVideo(query) {