mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Fix german title not being shortened
This commit is contained in:
@@ -160,7 +160,7 @@ module.exports = env => {
|
|||||||
if (path.match(/(\/|\\)_locales(\/|\\).+/)) {
|
if (path.match(/(\/|\\)_locales(\/|\\).+/)) {
|
||||||
const parsed = JSON.parse(content.toString());
|
const parsed = JSON.parse(content.toString());
|
||||||
if (env.browser.toLowerCase() === "safari") {
|
if (env.browser.toLowerCase() === "safari") {
|
||||||
parsed.fullName.message = parsed.fullName.message.match(/^.+(?= -)/)?.[0] || parsed.fullName.message;
|
parsed.fullName.message = parsed.fullName.message.match(/^.+(?= [-–])/)?.[0] || parsed.fullName.message;
|
||||||
if (parsed.fullName.message.length > 50) {
|
if (parsed.fullName.message.length > 50) {
|
||||||
parsed.fullName.message = parsed.fullName.message.slice(0, 47) + "...";
|
parsed.fullName.message = parsed.fullName.message.slice(0, 47) + "...";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user