-
Notifications
You must be signed in to change notification settings - Fork 0
/
better-art-decor.user.js
50 lines (45 loc) · 1.23 KB
/
better-art-decor.user.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
44
45
46
47
48
49
50
// ==UserScript==
// @name Better Art-Decor
// @author https://github.com/qligier/
// @namespace qligier
// @version 20220115
// @updateURL https://raw.githubusercontent.com/qligier/web_userscripts/master/better-art-decor.user.js
// @match http://art-decor.org/*
// @match https://art-decor.org/*
// @grant none
// ==/UserScript==
/**
* This userscript is updated from GitHub.
*/
const stylesheetContent = `
tr.cancelled {
opacity: 0.4;
}
`;
(function () {
// Add stylesheet to document
const stylesheet = document.createElement('style');
stylesheet.innerHTML = stylesheetContent;
document.body.appendChild(stylesheet);
document.querySelectorAll('table#valueSetList tr').forEach(row => {
const status = row.querySelector('td:nth-child(10)')
if (status) {
switch (status.innerText) {
case 'Cancelled':
row.classList.add('cancelled')
break;
}
}
})
document.querySelectorAll('table#templatesList tr').forEach(row => {
const status = row.querySelector('td:nth-child(9)')
console.log(status)
if (status) {
switch (status.innerText) {
case 'Cancelled':
row.classList.add('cancelled')
break;
}
}
})
})()