mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
mac add number
This commit is contained in:
parent
30573143c0
commit
6d2d7c2f81
@ -126,6 +126,23 @@ function menu() {
|
||||
a.innerText = a.href
|
||||
}
|
||||
}
|
||||
|
||||
var m = document.getElementsByTagName("pre");
|
||||
for (var i = 0; i < m.length; i++) {
|
||||
var line = (m[i].clientHeight-10)/15
|
||||
// if (line < 3) {
|
||||
// continue
|
||||
// }
|
||||
console.log(m[i].clientHeight)
|
||||
var nu = m[i].parentElement.insertBefore(document.createElement("div"), m[i]);
|
||||
nu.className = "number1"
|
||||
|
||||
for (var j = 1; j <= line; j++) {
|
||||
console.log(j)
|
||||
var li = nu.appendChild(document.createElement("div"));
|
||||
li.appendChild(document.createTextNode(""+j));
|
||||
}
|
||||
}
|
||||
}
|
||||
function query(event) {
|
||||
if (event) {
|
||||
|
@ -24,8 +24,9 @@
|
||||
pre {
|
||||
border:solid 1px green;
|
||||
padding:5px;
|
||||
border-left:solid 5px green;
|
||||
border-left:solid 2px green;
|
||||
overflow:scroll;
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
code {
|
||||
font-size:13px;
|
||||
|
@ -146,6 +146,21 @@
|
||||
.link div {
|
||||
padding-left:10px;
|
||||
}
|
||||
.number1 {
|
||||
padding:5px;
|
||||
float:left;
|
||||
margin-left:0px;
|
||||
font-size:13px;
|
||||
background-color:#f8f8f8;
|
||||
border: solid 1px green;
|
||||
|
||||
}
|
||||
.number1 div {
|
||||
text-align:right;
|
||||
margin:0;
|
||||
padding:0;
|
||||
margin-left:0px;
|
||||
}
|
||||
</style>
|
||||
<div class="content">
|
||||
<div class="toggle" title="点击,显示或隐藏目录" onclick="toggle()"></div>
|
||||
|
@ -65,6 +65,5 @@ $ sudo apt-get update
|
||||
$ sudo apt-get install asciinema
|
||||
$ sudo apt-get install python3-pip
|
||||
$ sudo pip install TermRecord
|
||||
|
||||
```
|
||||
[终端录制](https://asciinema.org/)
|
||||
|
Loading…
x
Reference in New Issue
Block a user