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 characters
// ==UserScript== | |
// @name Dim Image Background | |
// @namespace https://gist.github.com/thchan384 | |
// @version 1.1 | |
// @description Turn background to black when page contains a standalone image | |
// @author thchan384 | |
// @match *://*/* | |
// @updateURL https://gist.github.com/thchan384/25ba9515064731823bbf223341706968/raw/dim-image-background.user.js | |
// @downloadURL https://gist.github.com/thchan384/25ba9515064731823bbf223341706968/raw/dim-image-background.user.js | |
// @run-at document-idle |
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 characters
set terminalCommand to "open 'x-apple.systempreferences:com.apple.systempreferences.AppleIDSettings'" | |
do shell script terminalCommand | |
delay 5 | |
tell application "System Events" | |
tell application process "System Settings" | |
activate | |
tell splitter group 1 of group 1 of window 1 | |
tell group 2 to tell group 1 to tell scroll area 1 to tell group 3 | |
repeat until UI element 1 exists | |
delay 0 |