X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fcore-utils%2Fcommon%2Furl.ts;fp=shared%2Fcore-utils%2Fcommon%2Furl.ts;h=9c111cbcc32fee117f675922932ed720d7721824;hb=bdb1dfc17653ca327c2656922a651762fd222a24;hp=52ed247c437a0e1f20ba8c3d38f9108de394e7c1;hpb=9b513232ac916e963a3ad85a0cef777638143b70;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/core-utils/common/url.ts b/shared/core-utils/common/url.ts index 52ed247c4..9c111cbcc 100644 --- a/shared/core-utils/common/url.ts +++ b/shared/core-utils/common/url.ts @@ -53,7 +53,7 @@ function decorateVideoLink (options: { }) { const { url } = options - const params = generateParams(window.location.search) + const params = new URLSearchParams() if (options.startTime !== undefined && options.startTime !== null) { const startTimeInt = Math.floor(options.startTime) @@ -85,7 +85,7 @@ function decoratePlaylistLink (options: { }) { const { url } = options - const params = generateParams(window.location.search) + const params = new URLSearchParams() if (options.playlistPosition) params.set('playlistPosition', '' + options.playlistPosition) @@ -119,12 +119,3 @@ function buildUrl (url: string, params: URLSearchParams) { return url } - -function generateParams (url: string) { - const params = new URLSearchParams(window.location.search) - // Unused parameters in embed - params.delete('videoId') - params.delete('resume') - - return params -}