guh
This commit is contained in:
parent
9105c3563e
commit
79ab38f8f0
1 changed files with 3 additions and 2 deletions
|
@ -35,7 +35,8 @@ function shorten(str) {
|
||||||
|
|
||||||
var urlStart = str.indexOf("://") + 3;
|
var urlStart = str.indexOf("://") + 3;
|
||||||
if (urlStart == 2) urlStart = 0;
|
if (urlStart == 2) urlStart = 0;
|
||||||
return str.length <= len ? str : `[${str.slice(urlStart, urlStart + (len - 3))}...](${str.startsWith("magnet:") ? (`${process.env.BASE_URL}/magnet/${str}`) : str})`;
|
|
||||||
|
return str.length <= len ? str : `[${str.slice(urlStart, urlStart + (len - 3))}...](${(str.startsWith("magnet:") ? (`${process.env.BASE_URL}/magnet/${str}`) : str).replaceAll(" ", "%20")})`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const emojis = JSON.parse(readFileSync("config/emojis.json"));
|
const emojis = JSON.parse(readFileSync("config/emojis.json"));
|
||||||
|
|
Loading…
Reference in a new issue