mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
fix timestamp in share links (#1371)
This commit is contained in:
parent
a6927f9bd9
commit
e755581d18
1 changed files with 4 additions and 3 deletions
|
@ -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 a new issue