mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Add size limit to description for edge
This commit is contained in:
parent
7064d3fe82
commit
17cbd068b9
1 changed files with 7 additions and 0 deletions
|
@ -171,6 +171,13 @@ module.exports = env => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (env.browser.toLowerCase() === "edge") {
|
||||||
|
parsed.Description.message = parsed.Description.message.match(/^.+(?=\. )/)?.[0] || parsed.Description.message;
|
||||||
|
if (parsed.Description.message.length > 132) {
|
||||||
|
parsed.Description.message = parsed.Description.message.slice(0, 129) + "...";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Buffer.from(JSON.stringify(parsed));
|
return Buffer.from(JSON.stringify(parsed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue