Skip to content

Commit

Permalink
πŸŽ‰ feat: boat anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
roycetech committed Jan 3, 2024
1 parent 55cd864 commit 26a7c19
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts/allow-apple-events-in-microsoft-edge.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
(*
Will trigger the "Allow JavaScript from Apple Events" in the menu for the AppleScripts to work with the app.
DOES NOT WORK. Perform this manually instead.
@Created: December 31, 2023 4:46 PM
*)
activate application "Microsoft Edge"

tell application "System Events" to tell process "Microsoft Edge"
set frontmost to true
try
set allowJavaScriptMenu to menu item "Allow JavaScript from Apple Events" of menu 1 of menu item "Developer" of menu 1 of menu bar item "Tools" of menu bar 1
if value of attribute "AXMenuItemMarkChar" of allowJavaScriptMenu is missing value then
log "Clicking the menu"
-- click allowJavaScriptMenu
click menu item "Allow JavaScript from Apple Events" of menu 1 of menu item "Developer" of menu 1 of menu bar item "Tools" of menu bar 1
-- click menu item "View Source" of menu 1 of menu item "Developer" of menu 1 of menu bar item "Tools" of menu bar 1

-- click menu item "Refresh This Page" of menu 1 of menu bar item "View" of menu bar 1
end if

on error the errorMessage number the errorNumber
log errorMessage
end try
end tell

0 comments on commit 26a7c19

Please sign in to comment.