📄 highlight.js
字号:
function highLight_attribute($1)
{
var attribute_html = $1
var re = /([\S]+=)(\S+)/g
attribute_html = attribute_html.replace(re, "<font color=red>$1</font><font color=black>$2</font>")
return attribute_html
}
function highLight_tag($1)
{
return "<font color=blue>"+highLight_attribute($1)+"</font>"
}
function show(mate)
{
mate.previousSibling.previousSibling.innerText=mate.previousSibling.innerText;
var html=mate.previousSibling.innerHTML;
re = /(<[\S]+?.*?>)/g
html = html.replace(re, highLight_tag)
html = html.replace(/\n/g, "<br>")
html = html.replace(/(\$?\d+(%|px)?)/g, "<font color=red>$1</font>")
html = html.replace(/(\".*?\")/g, function($1)
{
$1 = $1.replace(/<.*?>/g, "")
return "<font color=#999999>"+$1+"</font>"
})
mate.previousSibling.innerHTML = html
}
function stopError()
{return true}
window.onerror=stopError
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -