mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Convert \n in localized strings to <br/> for html
This commit is contained in:
@@ -206,7 +206,7 @@ class Utils {
|
|||||||
|
|
||||||
getLocalizedMessage(text: string): string | false {
|
getLocalizedMessage(text: string): string | false {
|
||||||
const valNewH = text.replace(/__MSG_(\w+)__/g, function(match, v1) {
|
const valNewH = text.replace(/__MSG_(\w+)__/g, function(match, v1) {
|
||||||
return v1 ? chrome.i18n.getMessage(v1) : "";
|
return v1 ? chrome.i18n.getMessage(v1).replace("\n", "<br/>") : "";
|
||||||
});
|
});
|
||||||
|
|
||||||
if(valNewH != text) {
|
if(valNewH != text) {
|
||||||
|
|||||||
Reference in New Issue
Block a user