initial working version
This commit is contained in:
commit
ae1db6e367
8
README.md
Normal file
8
README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
a flood of unnecessary sev2 notifications from a Zapier bot ruining your entire life?
|
||||
|
||||
Try installing this Tampermonkey script.
|
||||
|
||||
For the full app (tm) experience, run it in chrome like:
|
||||
`nohup google-chrome --app=https://app.slack.com &`
|
||||
|
||||
(works on linux idk about anywhere else)`
|
27
foz.user.js
Normal file
27
foz.user.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
// ==UserScript==
|
||||
// @name Zapier, why won't u just leave me alone?
|
||||
// @namespace http://git.minimally.online/
|
||||
// @version 0.1
|
||||
// @description Allows you to hide Slack messages from needlessly noisy apps/individuals based on content
|
||||
// @author drudgesentinel (Sean)
|
||||
// @match *://app.slack.com/*
|
||||
// @icon https://i.postimg.cc/NGb9WSWn/is-it-joy.png
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
//going to eventually want to check if the terraform-support is highlighted, probably. We'll see.
|
||||
|
||||
const removeMessages = () => {
|
||||
const messages = Array.from(document.querySelectorAll('[data-qa="virtual-list-item"]'));
|
||||
const haveButtons = messages.filter(message => message.querySelector('button'));
|
||||
haveButtons.forEach( (node) => removeIfSpam(node, "SEV2 Handoff Candidate"));
|
||||
}
|
||||
|
||||
const removeIfSpam = (node, spamMessage) => {
|
||||
if(node.querySelector('button').textContent.includes(spamMessage)) {
|
||||
node.replaceChildren();
|
||||
}
|
||||
}
|
||||
|
||||
//adjust this, faster is better but might impact performance idk
|
||||
setInterval( removeMessages, 500);
|
Loading…
Reference in a new issue