mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 18:42:59 +03:00
fix colors sdfsdfsdf
This commit is contained in:
parent
1f9c739878
commit
fb56e5c06f
@ -96,22 +96,22 @@ function updateCursor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function stripColors(content) {
|
function stripColors(content) {
|
||||||
return convertColorCodes(content)
|
return stripHtml(convertColorCodes(content))
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeColorCodesPrintable(input) {
|
function makeColorCodesPrintable(input) {
|
||||||
return input.replace(/\$#([0-9a-fA-F]{6})/g, '$##$1')
|
return input.replace(/\$#([0-9a-fA-F]{6})/g, "$$##$1")
|
||||||
.replace(/\$([A-Z_]+)--/g, '$#$1--')
|
.replace(/\$([A-Z_]+)--/g, "$$#$1--")
|
||||||
.replace(/\$reset/g, '$#reset');
|
.replace(/\$reset/g, "$$#reset")
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertColorCodes(input) {
|
function convertColorCodes(input) {
|
||||||
return input.replace(/\$#([0-9a-fA-F]{6})/g, '<span style="color: #$1">')
|
return input.replace(/\$#([0-9a-fA-F]{6})/g, '<span style="color: #$1">')
|
||||||
.replace(/\$##([0-9a-fA-F]{6})/g, '$#$1')
|
.replace(/\$##([0-9a-fA-F]{6})/g, '$$#$1')
|
||||||
.replace(/\$([A-Z_]+)--/g, '<span style="color: --$1">')
|
.replace(/\$([A-Z_]+)--/g, '<span style="color: --$1">')
|
||||||
.replace(/\$#([A-Z_]+)--/g, '$$1--')
|
.replace(/\$#([A-Z_]+)--/g, '$$$1--')
|
||||||
.replace(/\$reset/g, '</span>')
|
.replace(/\$reset/g, '</span>')
|
||||||
.replace(/\$#reset/g, '$reset');
|
.replace(/\$#reset/g, '$$reset');
|
||||||
}
|
}
|
||||||
|
|
||||||
function stripHtml(html) {
|
function stripHtml(html) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user