mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Update src/components/WatchVideo.vue
This commit is contained in:
parent
616021477f
commit
a77a600f31
1 changed files with 11 additions and 11 deletions
|
@ -462,17 +462,17 @@ export default {
|
|||
this.channelId = this.video.uploaderUrl.split("/")[2];
|
||||
if (!this.isEmbed) this.fetchSubscribedStatus();
|
||||
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(this.video.description, "text/html");
|
||||
xmlDoc.querySelectorAll("a").forEach(elem => {
|
||||
if (!elem.innerText.match(/(?:[\d]{1,2}:)?(?:[\d]{1,2}):(?:[\d]{1,2})/))
|
||||
elem.outerHTML = elem
|
||||
.getAttribute("href")
|
||||
.replace(/https:\/\/www\.youtube\.com\/watch\?v=/, "/watch?v=");
|
||||
});
|
||||
xmlDoc.querySelectorAll("br").forEach(elem => (elem.outerHTML = "\n"));
|
||||
this.video.description = rewriteDescription(xmlDoc.querySelector("body").innerHTML);
|
||||
this.updateWatched(this.video.relatedStreams);
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(this.video.description, "text/html");
|
||||
xmlDoc.querySelectorAll("a").forEach(elem => {
|
||||
if (!elem.innerText.match(/(?:[\d]{1,2}:)?(?:[\d]{1,2}):(?:[\d]{1,2})/))
|
||||
elem.outerHTML = elem
|
||||
.getAttribute("href")
|
||||
.replace(/https:\/\/www\.youtube\.com\/watch\?v=/, "/watch?v=");
|
||||
});
|
||||
xmlDoc.querySelectorAll("br").forEach(elem => (elem.outerHTML = "\n"));
|
||||
this.video.description = rewriteDescription(xmlDoc.querySelector("body").innerHTML);
|
||||
this.updateWatched(this.video.relatedStreams);
|
||||
|
||||
this.fetchDeArrowContent(this.video.relatedStreams);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue