mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 05:57:07 +03:00
Add size limit to description for edge
This commit is contained in:
@@ -170,6 +170,13 @@ module.exports = env => {
|
|||||||
parsed.Description.message = parsed.Description.message.slice(0, 77) + "...";
|
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));
|
return Buffer.from(JSON.stringify(parsed));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user