-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
removeColours.js
43 lines (41 loc) · 1.15 KB
/
removeColours.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
39
40
41
42
43
export default {
icon: `<i class="fa-solid fa-droplet-slash fa-lg"></i>`,
name: {
en: "Remove all colors in web",
vi: "Xoá màu website",
},
description: {
en: "Remove all colours in the web.<br/>Click again to undo.",
vi: "Xoá mọi màu có trong website.<br/>Bấm lại để hoàn tác.",
},
changeLogs: {
"2024-05-01": "fix cors + undo",
},
contentScript: {
onClick_: function () {
const ufs_remove_colours_id = "ufs-remove-colours";
let exist = document.getElementById(ufs_remove_colours_id);
if (exist) {
exist.remove();
return;
}
let style = document.createElement("style");
style.id = "ufs-remove-colours";
style.textContent = `
*, *::before, *::after {
background: #ffffff4f ! important;
color: black !important;
}
img, video, canvas, picture, svg, object {
filter: grayscale(100%) !important;
}`;
// :link, :link * {
// color: #0000EE !important
// }
// :visited, :visited * {
// color: #551A8B !important
// }
document.head.appendChild(style);
},
},
};