1
0
Fork 0
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:
Chocobozzz 2018-05-18 11:02:40 +02:00
parent b4e5942ca7
commit cd4d7a2ca8
No known key found for this signature in database
GPG key ID: 583A612D890159BE
11 changed files with 94 additions and 26 deletions

View file

@ -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,