-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfilter.user.js
43 lines (38 loc) · 1.1 KB
/
filter.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
// ==UserScript==
// @name Roblox games filter.
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.roblox.com/games/*
// @match https://www.roblox.com/discover/*
// @grant none
// ==/UserScript==
(function robloxGamesFilterUserScript() {
for (let i = 1; i <= 10; i++) {
setTimeout(
() => [...document.querySelectorAll('.game-card')]
.filter((card) => {
const noVote = card.querySelector('.no-vote');
if (noVote) {
return true;
}
const nativeAdLabel = card.querySelector('.native-ad-label');
if (nativeAdLabel) {
return true;
}
const votePercentageLabel = card
.querySelector('.vote-percentage-label')
.textContent.slice(0, -1);
const playingCountsLabel = card.querySelector('.playing-counts-label').title;
const remove = votePercentageLabel < 76 || playingCountsLabel < 30;
return remove;
})
.forEach((card) => {
const c = card;
c.style = 'display: none';
}),
2000 * i,
);
}
}());