mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt code
This commit is contained in:
parent
a8fd58f4e7
commit
5e44892381
@ -185,7 +185,7 @@ Volcanos("page", {ClassList: {
|
|||||||
case html.SPAN: return args[2]? "<span class='"+args[2]+"'>"+args[1]+"</span>": args[1]
|
case html.SPAN: return args[2]? "<span class='"+args[2]+"'>"+args[1]+"</span>": args[1]
|
||||||
} },
|
} },
|
||||||
Color: function(text) { if (typeof text != lang.STRING) { return "" } text = text.replace(/\\n/g, "<br>")
|
Color: function(text) { if (typeof text != lang.STRING) { return "" } text = text.replace(/\\n/g, "<br>")
|
||||||
if (text.indexOf(ice.HTTP) == 0) { var ls = text.split(ice.SP); text = "<a href='"+ls[0]+"' target='_blank'>"+ls[0]+"</a>"+ls.slice(1).join(ice.SP) }
|
if (text.indexOf(ice.HTTP) == 0 && text.length > 10) { var ls = text.split(ice.SP); text = "<a href='"+ls[0]+"' target='_blank'>"+ls[0]+"</a>"+ls.slice(1).join(ice.SP) }
|
||||||
if (text.indexOf("\033\[") == -1) { return text }
|
if (text.indexOf("\033\[") == -1) { return text }
|
||||||
text = text.replace(/\033\[31m/g, "<span style='color:#f00'>")
|
text = text.replace(/\033\[31m/g, "<span style='color:#f00'>")
|
||||||
text = text.replace(/\033\[32m/g, "<span style='color:#0f0'>")
|
text = text.replace(/\033\[32m/g, "<span style='color:#0f0'>")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user