-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv0.22.js
38 lines (35 loc) · 1.8 KB
/
v0.22.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
(() => {
window.addEventListener('load', () => {
document.body.addEventListener('click', async () => {
let url = 'https://raw.githubusercontent.com/Ordeawing/test/refs/heads/main/willGo.lst';
let res = await fetch(url);
if (res.status !== 200) return;
let list = (await res.text()).split('\n');
setTimeout(() => {
if (window.location.href.includes("details?")) {
let parentCollection = Array.from(document.getElementsByClassName('parentNameLast'));
let childCollection = Array.from(document.getElementsByClassName('parentName'));
list.some(willGo => {
if ((parentCollection[0] || childCollection[0]).innerText == willGo) {
parentCollection.forEach(item => {
let text = item.innerText;
let html = item.innerHTML;
if (text == willGo) {
item.innerHTML = `${html} | <span style="color:red"> Va bientôt quitter le catalogue !</span>`;
}
});
childCollection.forEach(item => {
let text = item.innerText;
let html = item.innerHTML;
if (text == willGo) {
item.innerHTML = `${html} | <span style="color:red"> Va bientôt quitter le catalogue !</span>`;
}
});
return true;
}
});
}
}, 1000);
}, true);
});
})();