Update src/components/WatchVideo.vue

This commit is contained in:
sweep-ai[bot] 2023-08-05 12:37:30 +00:00 committed by GitHub
parent 9b2fec0646
commit 134afd5235
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -463,7 +463,7 @@ export default {
if (!this.isEmbed) this.fetchSubscribedStatus(); if (!this.isEmbed) this.fetchSubscribedStatus();
const parser = new DOMParser(); const parser = new DOMParser();
const xmlDoc = parser.parseFromString(this.video.description, "text/html"); const xmlDoc = parser.parseFromString(this.video.description, "text/html");
xmlDoc.querySelectorAll("a").forEach(elem => { xmlDoc.querySelectorAll("a").forEach(elem => {
if (!elem.innerText.match(/(?:[\d]{1,2}:)?(?:[\d]{1,2}):(?:[\d]{1,2})/)) if (!elem.innerText.match(/(?:[\d]{1,2}:)?(?:[\d]{1,2}):(?:[\d]{1,2})/))
elem.outerHTML = elem elem.outerHTML = elem