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
| #!/usr/bin/osascript | |
| # Name of the device as visible in Safari->Develop menu | |
| set deviceName to "iPhone Simulator" | |
| # Number of seconds to wait for the simulator window to show up | |
| set maxWait to 30 | |
| # --------------------------------------- | |
| # You shouldn't modify anything below here |
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
| # Customize and Export as Application | |
| set device_name to "My iPhone" | |
| tell application "Safari" | |
| activate | |
| tell application "System Events" | |
| click menu item "index.html" of menu device_name of menu item device_name of menu "Develop" of menu bar item "Develop" of menu bar 1 of application process "Safari" | |
| end tell | |
| end tell |
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
| (* | |
| Probe Menu Bar | |
| This script uses UI element scripting to return a list of every menuitem | |
| of every menu for every application currently running. | |
| If "Enable access for assistive devices" is not checked, | |
| this script will open the Universal Access System Preference and ask | |
| the user to check the checkbox. |
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
| // Cross browser, backward compatible solution | |
| (function( window, Date ) { | |
| // feature testing | |
| var raf = window.mozRequestAnimationFrame || | |
| window.webkitRequestAnimationFrame || | |
| window.msRequestAnimationFrame || | |
| window.oRequestAnimationFrame; | |
| window.animLoop = function( render, element ) { | |
| var running, lastFrame = +new Date; |
NewerOlder

