-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove.js
36 lines (31 loc) · 1.01 KB
/
remove.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
// ==UserScript==
// @name Remove Roblox Events Tab
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Remove the "Events" tab from the Roblox website
// @author Osintedx
// @match https://www.roblox.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
function removeEventsTab() {
const tabs = document.querySelectorAll('a.rbx-tab-heading span.text-lead.ng-binding');
tabs.forEach(tab => {
if (tab.textContent.trim() === 'Events') {
tab.closest('a.rbx-tab-heading').remove();
console.log('%cRemoved Events tab', 'font-size: 20px; color: red; font-weight: bold;');
}
});
}
window.addEventListener('load', () => {
removeEventsTab();
const observer = new MutationObserver(() => {
removeEventsTab();
});
observer.observe(document.body, {
childList: true,
subtree: true
});
});
})();