Added language support for Quetre https://github.com/libredirect/browser_extension/issues/736
This commit is contained in:
parent
8e93230930
commit
3cf6a43093
|
@ -557,6 +557,16 @@ function redirect(url, type, initiator, forceRedirection) {
|
|||
default: {
|
||||
return `${randomInstance}${url.pathname}${url.search}`
|
||||
}
|
||||
case "quetre": {
|
||||
const regex = /([a-z]+)\.quora\.com/.exec(url.hostname)
|
||||
console.log(regex)
|
||||
if (regex) {
|
||||
const lang = regex[1]
|
||||
url.searchParams.append("lang", lang)
|
||||
return `${randomInstance}${url.pathname}${url.search}`
|
||||
}
|
||||
return `${randomInstance}${url.pathname}${url.search}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue