diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-11 12:00:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-11 12:00:29 +0200 |
commit | 0fe87dc5a1c37d98740bf012e5bac09a21862a89 (patch) | |
tree | eb7898dc64b7d14e06c68931481f3464560ad24c | |
parent | bdb1dfc17653ca327c2656922a651762fd222a24 (diff) | |
download | PeerTube-0fe87dc5a1c37d98740bf012e5bac09a21862a89.tar.gz PeerTube-0fe87dc5a1c37d98740bf012e5bac09a21862a89.tar.zst PeerTube-0fe87dc5a1c37d98740bf012e5bac09a21862a89.zip |
Remove unused function
-rw-r--r-- | client/src/app/helpers/utils/url.ts | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/client/src/app/helpers/utils/url.ts b/client/src/app/helpers/utils/url.ts index 82d9cc11b..b3cded8f4 100644 --- a/client/src/app/helpers/utils/url.ts +++ b/client/src/app/helpers/utils/url.ts | |||
@@ -1,19 +1,5 @@ | |||
1 | import { environment } from '../../../environments/environment' | 1 | import { environment } from '../../../environments/environment' |
2 | 2 | ||
3 | // Thanks: https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript | ||
4 | function getParameterByName (name: string, url: string) { | ||
5 | if (!url) url = window.location.href | ||
6 | name = name.replace(/[[\]]/g, '\\$&') | ||
7 | |||
8 | const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)') | ||
9 | const results = regex.exec(url) | ||
10 | |||
11 | if (!results) return null | ||
12 | if (!results[2]) return '' | ||
13 | |||
14 | return decodeURIComponent(results[2].replace(/\+/g, ' ')) | ||
15 | } | ||
16 | |||
17 | function getAbsoluteAPIUrl () { | 3 | function getAbsoluteAPIUrl () { |
18 | let absoluteAPIUrl = environment.hmr === true | 4 | let absoluteAPIUrl = environment.hmr === true |
19 | ? 'http://localhost:9000' | 5 | ? 'http://localhost:9000' |
@@ -64,7 +50,6 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) { | |||
64 | } | 50 | } |
65 | 51 | ||
66 | export { | 52 | export { |
67 | getParameterByName, | ||
68 | objectToFormData, | 53 | objectToFormData, |
69 | getAbsoluteAPIUrl, | 54 | getAbsoluteAPIUrl, |
70 | getAbsoluteEmbedUrl | 55 | getAbsoluteEmbedUrl |