mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-12 19:28:22 +00:00
fix timestamp in share links (#1371)
This commit is contained in:
parent
a6927f9bd9
commit
e755581d18
@ -69,11 +69,12 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
generatedLink() {
|
generatedLink() {
|
||||||
var href = this.pipedLink
|
var baseUrl = this.pipedLink
|
||||||
? window.location.origin + "/watch?v=" + this.videoId
|
? window.location.origin + "/watch?v=" + this.videoId
|
||||||
: "https://youtu.be/" + this.videoId;
|
: "https://youtu.be/" + this.videoId;
|
||||||
if (this.withTimeCode && this.timeStamp > 0) href += "?t=" + this.timeStamp;
|
var url = new URL(baseUrl);
|
||||||
return href;
|
if (this.withTimeCode && this.timeStamp > 0) url.searchParams.append("t", this.timeStamp);
|
||||||
|
return url.href;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user