aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-11 12:00:29 +0200
committerChocobozzz <me@florianbigard.com>2021-10-11 12:00:29 +0200
commit0fe87dc5a1c37d98740bf012e5bac09a21862a89 (patch)
treeeb7898dc64b7d14e06c68931481f3464560ad24c
parentbdb1dfc17653ca327c2656922a651762fd222a24 (diff)
downloadPeerTube-0fe87dc5a1c37d98740bf012e5bac09a21862a89.tar.gz
PeerTube-0fe87dc5a1c37d98740bf012e5bac09a21862a89.tar.zst
PeerTube-0fe87dc5a1c37d98740bf012e5bac09a21862a89.zip
Remove unused function
-rw-r--r--client/src/app/helpers/utils/url.ts15
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 @@
1import { environment } from '../../../environments/environment' 1import { environment } from '../../../environments/environment'
2 2
3// Thanks: https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
4function 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
17function getAbsoluteAPIUrl () { 3function 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
66export { 52export {
67 getParameterByName,
68 objectToFormData, 53 objectToFormData,
69 getAbsoluteAPIUrl, 54 getAbsoluteAPIUrl,
70 getAbsoluteEmbedUrl 55 getAbsoluteEmbedUrl