-
Notifications
You must be signed in to change notification settings - Fork 0
/
b-longlonglong.html
54 lines (52 loc) · 1.87 KB
/
b-longlonglong.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>B站 - 如意长长长</title>
<script>
// 脚本名称
let scriptName = "如意长长长";
// 更新日志
let update = [
"0.2 - [2024年5月5日]优化浮动sticky样式",
"0.1 - 初版"
];
// 脚本内容
let code = ()=>{
let l_fa_old = document.querySelector(".r-con");
if (l_fa_old) {
l_fa_old.style.position = "relative";
}
let tmp = document.querySelector(".video-sections-content-list");
let b = document.createElement("a");
b.className = "item issue";
b.style = "position: sticky;top: 200px;z-index: 2;transform: translate(10px); writing-mode: vertical-rl; border: 1px solid var(--line_regular); background-color: var(--bg1_float); padding: 10px; border-radius: 8px; display: block;";
b.onclick = () => {
let l = document.querySelector(".base-video-sections-v1>.video-sections-content-list");
if (l.style.maxHeight == "none") {
l.style.maxHeight = "";
} else {
l.style.maxHeight = "none";
l.style.height = "auto";
}
};
b.innerText = "如意长长长";
let c = document.createElement("div");
c.style = "position: absolute; left: calc(100% - 10px); height: calc(100% - 80px);";
c.appendChild(b);
tmp.before(c);
}
</script>
</head>
<body>
<h2>B站 - 如意长长长</h2>
<b>快速使用 →</b><a id="fast">如意长长长</a>
<br><i>拖动到书签栏即可</i>
<h3>最新代码</h3>
<pre id="code"></pre>
<hr>
<h3>更新历史</h3>
<ul id="updateLog"></ul>
</body>
<script src="autoLoadCodeAndLog.js"></script>
</html>