Created
February 2, 2018 23:58
-
-
Save jabyrd3/ab2e3dd9ff54f6785e63f711e74c9827 to your computer and use it in GitHub Desktop.
Hides 'custom reply' messages from slackbot in a channel defined with 'indexof'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i "" -e '/startup();/ a\ | |
setTimeout(()=>require(\"electron\").remote.webContents.getAllWebContents().map(e=>e.on(\"did-navigate-in-page\",(e,t,n)=>n&&e.sender.executeJavaScript("if(document.title.indexOf(\\"project-sa-code\\") > -1){const style = document.createElement(\\"style\\"); style.type=\\"text/css\\";style.innerHTML = \\".c-message--custom_response { display: none; }\\"; document.getElementsByTagName(\\"head\\")[0].appendChild(style);}\"))), 6000);' /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/index.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment