support Youtube noCookie Mode

This commit is contained in:
Omar Khatib
2018-12-13 17:30:10 +01:00
parent e8d2f23b81
commit 11618353ea
3 changed files with 5 additions and 1 deletions

View File

@ -395,6 +395,8 @@ const defaults = {
enabled: false,
publisherId: '',
},
noCookie: false,
};
export default defaults;

View File

@ -19,7 +19,7 @@ export const types = {
*/
export function getProviderByUrl(url) {
// YouTube
if (/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.?be)\/.+$/.test(url)) {
if (/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(url)) {
return providers.youtube;
}