This file contains 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
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
(* | |
Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window) | |
Much more elegant version: Leon Cowle (https://github.com/leoncowle) | |
Even more elegant version: https://stackoverflow.com/questions/54066100/applescript-to-split-safari-tabs-into-new-window/54089865#54089865 | |
Worth a warning: "moving" tabs with this script doesn't actually move them like | |
drag-and-drop does. The tabs "moved" by this script will reload in the new window, |
This file contains 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
extension Locale { | |
/// Returns an SF Symbol currency image that match's the device's current locale, for instance dollar in North America, Indian rupee in India, etc. | |
func currencySFSymbol(filled: Bool, withConfiguration configuration: UIImage.Configuration? = nil) -> UIImage { | |
// Default currency symbol will be the Animal Crossing Leaf coin to remain impartial to any specific country | |
let defaultSymbol = UIImage(systemName: "leaf.circle\(filled ? ".fill" : "")")! | |
guard let currencySymbolName = currencySymbolNameForSFSymbols() else { return defaultSymbol } | |
let systemName = "\(currencySymbolName).circle\(filled ? ".fill" : "")" | |
return UIImage(systemName: systemName, withConfiguration: configuration) ?? defaultSymbol |