feat: reduce permissions for pageState script

This commit is contained in:
SethBurkart123
2025-02-24 15:52:24 +11:00
parent 44325f0d49
commit ca5d232e47
4 changed files with 15 additions and 31 deletions
+5 -3
View File
@@ -20,6 +20,10 @@ const handleNotificationClick = async (target: HTMLElement) => {
// Select the specific direct message
ReactFiber.find('.Viewer__Viewer___32BH-').setState({ selected: new Set([matchingNotification.message.messageID]) });
// Close the notifications panel
const notificationButton = document.querySelector('.notifications__notifications___3mmLY > button') as HTMLButtonElement | null;
notificationButton?.click();
};
const clickListeners = [
@@ -29,9 +33,7 @@ const clickListeners = [
},
];
const registerClickListeners = () => {
console.log("Registering click listeners...");
const registerClickListeners = () => {
document.addEventListener('click', (e) => {
const target = e.target as HTMLElement;