Last active
December 15, 2019 08:01
-
-
Save jeebak/b6fee546f2d8c4f4cecc4efab63373d6 to your computer and use it in GitHub Desktop.
Revisions
-
jeebak revised this gist
Dec 15, 2019 . 1 changed file with 1 addition and 40 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,43 +4,4 @@ # https://github.com/widget-/slack-black-theme # https://github.com/laCour/slack-night-mode/ # No longer relevant -
jeebak revised this gist
Jul 17, 2019 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -9,9 +9,19 @@ # ... it's on a read-only squashFS filesystem # Windows: TARGET="%systemdrive%%homepath%\AppData\Local\slack\app-3.1.1\resources\app.asar.unpacked\src\static\ssb-interop.js" # ... where app-3.1.1 is the current version BASE="/Applications/Slack.app/Contents/Resources" CUSTOM_CSS="https://raw.githubusercontent.com/laCour/slack-night-mode/master/css/raw/black.css" # Slack 3.x TARGET="$BASE/app.asar.unpacked/src/static/ssb-interop.js" # Slack 4.x if [[ ! -e "$TARGET" ]]; then npx asar extract "$BASE"/app.asar{,.unpacked} TARGET="$BASE/app.asar.unpacked/dist/ssb-interop.bundle.js" REPACK="true" fi if [[ -f "$TARGET" ]]; then if ! grep "$CUSTOM_CSS" "$TARGET" > /dev/null 2>&1; then # https://github.com/laCour/slack-night-mode/issues/73#issuecomment-287467332 @@ -27,6 +37,7 @@ document.addEventListener('DOMContentLoaded', function() { }); EOT [[ "$REPACK" = "true" ]] && npx asar pack "$BASE"/app.asar{.unpacked,} echo "Restarting Slack" osascript -e 'quit app "Slack"' sleep 3 -
jeebak revised this gist
May 6, 2018 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,11 @@ # https://github.com/widget-/slack-black-theme # https://github.com/laCour/slack-night-mode/ # Linux: TARGET="/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js" # Snap: TARGET="/snap/slack/6/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js" # ... it's on a read-only squashFS filesystem # Windows: TARGET="%systemdrive%%homepath%\AppData\Local\slack\app-3.1.1\resources\app.asar.unpacked\src\static\ssb-interop.js" # ... where app-3.1.1 is the current version TARGET="/Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js" CUSTOM_CSS="https://raw.githubusercontent.com/laCour/slack-night-mode/master/css/raw/black.css" -
jeebak revised this gist
Apr 28, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ # https://github.com/laCour/slack-night-mode/ TARGET="/Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js" CUSTOM_CSS="https://raw.githubusercontent.com/laCour/slack-night-mode/master/css/raw/black.css" if [[ -f "$TARGET" ]]; then if ! grep "$CUSTOM_CSS" "$TARGET" > /dev/null 2>&1; then -
jeebak revised this gist
Mar 12, 2018 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,9 @@ document.addEventListener('DOMContentLoaded', function() { }); EOT echo "Restarting Slack" osascript -e 'quit app "Slack"' sleep 3 open -a Slack fi fi -
jeebak created this gist
Jun 9, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #!/usr/bin/env bash # https://gist.github.com/DrewML/0acd2e389492e7d9d6be63386d75dd99 # https://github.com/widget-/slack-black-theme # https://github.com/laCour/slack-night-mode/ TARGET="/Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js" CUSTOM_CSS="https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css" if [[ -f "$TARGET" ]]; then if ! grep "$CUSTOM_CSS" "$TARGET" > /dev/null 2>&1; then # https://github.com/laCour/slack-night-mode/issues/73#issuecomment-287467332 cat << EOT >> "$TARGET" document.addEventListener('DOMContentLoaded', function() { $.ajax({ url: '$CUSTOM_CSS', success: function(css) { \$('<style></style>').appendTo('head').html(css); } }); }); EOT echo "Restart Slack" fi fi