mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Fix peertube with google bot
This commit is contained in:
parent
b4e5942ca7
commit
cd4d7a2ca8
11 changed files with 94 additions and 26 deletions
|
@ -55,6 +55,15 @@ function immutableAssign <A, B> (target: A, source: B) {
|
|||
return Object.assign({}, target, source)
|
||||
}
|
||||
|
||||
function objectToUrlEncoded (obj: any) {
|
||||
const str: string[] = []
|
||||
for (const key of Object.keys(obj)) {
|
||||
str.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))
|
||||
}
|
||||
|
||||
return str.join('&')
|
||||
}
|
||||
|
||||
// Thanks: https://gist.github.com/ghinda/8442a57f22099bdb2e34
|
||||
function objectToFormData (obj: any, form?: FormData, namespace?: string) {
|
||||
let fd = form || new FormData()
|
||||
|
@ -100,6 +109,7 @@ function isInMobileView () {
|
|||
}
|
||||
|
||||
export {
|
||||
objectToUrlEncoded,
|
||||
getParameterByName,
|
||||
populateAsyncUserVideoChannels,
|
||||
getAbsoluteAPIUrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue