Hey Folks,
Occasionally I want to duplicate a page in Safari next to itself, and there’s no convenient built-in method.
From an Execute an AppleScript action.
# Duplicate Safari Tab next to itself.
set js to "
var docURL = document.URL;
var open_link = window.open('','_blank');
open_link.location=docURL;
"
tell application "Safari"
tell front document
do JavaScript js
end tell
end tell
Or place this JavaScript in a bookmark on the Favorites Bar and access via ⌘⌥[0-9] or mouse-click.
javascript:var%20docURL%20=%20document.URL;var%20open_link%20=%20window.open('','_blank');open_link.location=docURL;
Or run the pure JavaScript code from an Execute JavaScript in Safari action.
var docURL = document.URL;
var open_link = window.open('','_blank');
open_link.location=docURL;
-Chris