From 52ba9e0053157e723d5b36a7b66cfdd418445a80 Mon Sep 17 00:00:00 2001 From: TheYoungManLi Date: Mon, 5 Dec 2022 16:37:45 +0800 Subject: [PATCH] fix: Open a new page for bilibili video in videos page Signed-off-by: TheYoungManLi --- layouts/videos/list.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layouts/videos/list.html b/layouts/videos/list.html index 75c142065..45c34a0db 100644 --- a/layouts/videos/list.html +++ b/layouts/videos/list.html @@ -60,7 +60,13 @@ var link = $(this).data('link') var language = $('.video-ul').data('language') if (language === 'zh') { - showVideo(link) + const isBiliBili = link.includes('player.bilibili.com') + // due to the browser's cookie policy, bilibili website cant be used in iframe + if(isBiliBili){ + window.open(link) + }else{ + showVideo(link) + } } else if (language === 'en') { showIframe(link) }