Improve i18n.

This commit is contained in:
Yang Luo
2021-05-24 20:48:04 +08:00
parent 2fff5f79ce
commit b23e8cf90c
5 changed files with 24 additions and 26 deletions

View File

@ -71,23 +71,6 @@ export function renderMessageLarge(ths, msg) {
}
}
export function trim(str, ch) {
if (str === undefined) {
return undefined;
}
let start = 0;
let end = str.length;
while(start < end && str[start] === ch)
++start;
while(end > start && str[end - 1] === ch)
--end;
return (start > 0 || end < str.length) ? str.substring(start, end) : str;
}
export function getOAuthGetParameters(params) {
const queries = (params !== undefined) ? params : new URLSearchParams(window.location.search);
const clientId = queries.get("client_id");