diff options
author | Ajay <[email protected]> | 2024-09-08 01:32:58 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2024-09-08 01:32:58 -0400 |
commit | 17cbd068b9decb87256ab96ec84e5a63e10640a9 (patch) | |
tree | 5b06be6294e34caae2b864aa9530bdd0e992857d | |
parent | 7064d3fe82b694580b28a41fdcbd0d1b237dc2d8 (diff) | |
download | SponsorBlock-17cbd068b9decb87256ab96ec84e5a63e10640a9.tar.gz SponsorBlock-17cbd068b9decb87256ab96ec84e5a63e10640a9.zip |
Add size limit to description for edge
-rw-r--r-- | webpack/webpack.common.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 6ba75b12..d17ec1b2 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -170,6 +170,13 @@ module.exports = env => { parsed.Description.message = parsed.Description.message.slice(0, 77) + "..."; } } + + 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)); } |