diff options
Diffstat (limited to 'client/src/app/helpers')
-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 |