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