虚空JS修改代码

虚空

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
document.querySelectorAll('*').forEach(element => {
if (getComputedStyle(element).backgroundColor === 'rgb(242, 252, 255)') { // 检查背景颜色是否为 #F2FCFF 的 rgb 表示
element.style.backgroundColor = 'black';
}
});

document.querySelectorAll('*').forEach(element => {
if (getComputedStyle(element).backgroundColor === 'rgb(0, 0, 0)') { // 检查背景颜色是否为黑色
element.style.border = 'none'; // 移除边框
}
});


//后区
document.querySelectorAll('*').forEach(element => {
const backgroundColor = getComputedStyle(element).backgroundColor;
if (backgroundColor === 'rgb(242, 252, 255)' || backgroundColor === 'rgb(255, 251, 240)') { // 同时检查 #F2FCFF 和 #FFFBF0 的 rgb 表示
element.style.backgroundColor = 'black';
}
});

// 如果您之前运行了修改边框的代码,并且希望对新修改背景色的元素也应用相同的边框处理,
// 请再次运行相应的边框处理代码(取消边框或设置边框颜色为黑色)。

// 例如,取消边框:
document.querySelectorAll('*').forEach(element => {
if (getComputedStyle(element).backgroundColor === 'rgb(0, 0, 0)') {
element.style.border = 'none';
}
});

// 或者,设置边框颜色为黑色:
// document.querySelectorAll('*').forEach(element => {
// if (getComputedStyle(element).backgroundColor === 'rgb(0, 0, 0)') {
// element.style.borderColor = 'black';
// }
// });

缩放

1
document.body.style.zoom = "135%";