]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Remove unused function
authorChocobozzz <me@florianbigard.com>
Mon, 11 Oct 2021 10:00:29 +0000 (12:00 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 11 Oct 2021 10:00:29 +0000 (12:00 +0200)
client/src/app/helpers/utils/url.ts

index 82d9cc11b47a95b67acec529fbbd453e9dc32584..b3cded8f4e2b15534663a4db59589a4cd144e339 100644 (file)
@@ -1,19 +1,5 @@
 import { environment } from '../../../environments/environment'
 
-// Thanks: https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript
-function getParameterByName (name: string, url: string) {
-  if (!url) url = window.location.href
-  name = name.replace(/[[\]]/g, '\\$&')
-
-  const regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)')
-  const results = regex.exec(url)
-
-  if (!results) return null
-  if (!results[2]) return ''
-
-  return decodeURIComponent(results[2].replace(/\+/g, ' '))
-}
-
 function getAbsoluteAPIUrl () {
   let absoluteAPIUrl = environment.hmr === true
     ? 'http://localhost:9000'
@@ -64,7 +50,6 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) {
 }
 
 export {
-  getParameterByName,
   objectToFormData,
   getAbsoluteAPIUrl,
   getAbsoluteEmbedUrl