Skip to content

Instantly share code, notes, and snippets.

@lacostenycoder
Last active January 30, 2017 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lacostenycoder/01108de10fe02e2f39d9cceb2457b895 to your computer and use it in GitHub Desktop.
Save lacostenycoder/01108de10fe02e2f39d9cceb2457b895 to your computer and use it in GitHub Desktop.
Hack to avoid white flashes new tabs on Chrome (night mode)
on run {input, parameters}
set the_application to (path to frontmost application as Unicode text)
repeat 5 times
tell application "System Events"
key code 107
end tell
end repeat
delay 1
tell application "System Events"
keystroke "t" using command down
delay 1
end tell
delay 1
repeat 5 times
tell application "System Events"
key code 113
end tell
end repeat
return input
end run
@lacostenycoder
Copy link
Author

Updated code to no longer rely on resizing screen at that was too buggy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment