Last active
June 23, 2022 21:42
-
-
Save rrichardsonv/07155b961b160a9544ca8516b760f1e1 to your computer and use it in GitHub Desktop.
script for bad css prank
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
#!/bin/bash | |
set -e | |
CRAPPY_CSS_REQUESTER=$(cat <<-END | |
// ----------------------- PRANK COOOODE --------------------------- | |
// CSS Hell stylesheet appender. Makes a request on load and appends a terrifyingly bad stylesheet | |
document.addEventListener('DOMContentLoaded', function () { | |
\$.ajax({ | |
url: 'https://gist.githubusercontent.com/rrichardsonv/09df45442428da954f6e62f4f1ce8f05/raw/16b20d0025ef961fce46bf2ad13798fc67368c6f/classic_bad_css.css', | |
success: function (css) { | |
\$('<style></style>').appendTo('head').html(css); | |
} | |
}); | |
}); | |
// ----------------------- PRANK COOOODE --------------------------- | |
END | |
) | |
echo "Enter or drag from finder the path to the Slack application" | |
echo "Note: Make sure it ends in .app" | |
read slackPath | |
# Remove trailing whitespace | |
CLEAN_SLACK_PATH="$(echo -e "${slackPath}" | sed -e 's/[[:space:]]*$//')/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js" | |
echo "Appending css request logic to $CLEAN_SLACK_PATH" | |
echo "$CRAPPY_CSS_REQUESTER" >> "$CLEAN_SLACK_PATH" | |
echo "It is done, the prank will be live once the application restarts" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Curl command for script above
bash -c "$(curl -fsSL gist.githubusercontent.com/rrichardsonv/07155b961b160a9544ca8516b760f1e1/raw/0a50e6ced094a6fba690beb0430c43b497263bec/append_crappy_css.sh)"