fixed: menu below colors
added: md comments in colors
This commit is contained in:
parent
5d5456c5ac
commit
88e1a7c60f
2 changed files with 15 additions and 0 deletions
14
main.js
14
main.js
|
|
@ -2026,6 +2026,15 @@ function save()
|
|||
}
|
||||
}
|
||||
|
||||
function escapeHtml(unsafe) {
|
||||
return unsafe
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'");
|
||||
}
|
||||
|
||||
function applycolors()
|
||||
{
|
||||
if (!settings.colors)
|
||||
|
|
@ -2039,6 +2048,7 @@ function applycolors()
|
|||
var result = [];
|
||||
lines.every( (line, i) =>
|
||||
{
|
||||
line = escapeHtml(line);
|
||||
if (line.startsWith("#"))
|
||||
{
|
||||
line = line.replace(/(#*)/g, "<span style='color:" + settings.accentcolor + "'>$1</span>");
|
||||
|
|
@ -2076,6 +2086,10 @@ function applycolors()
|
|||
line = line.replace(/(\[\[.*\]\])/g, "<u><span style='cursor:pointer'>$1</span></u>");
|
||||
line = line.replace(/(\*\*.*\*\*)/g, "<b>$1</b>");
|
||||
line = line.replace(/(\*.*\*)/g, "<em>$1</em>");
|
||||
|
||||
line = line.replace(/<\!/g, "<span style='color:lightgrey'><!");
|
||||
line = line.replace(/\-\->/g, "--></span>");
|
||||
|
||||
result.push(line);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ body::-webkit-scrollbar-thumb {
|
|||
opacity: 1;
|
||||
width: 90%;
|
||||
color: black;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* authent */
|
||||
|
|
|
|||
Loading…
Reference in a new issue