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
| javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{ | |
| default: Turndown | |
| }, { | |
| default: Readability | |
| }]) => { | |
| /* Optional vault name */ | |
| const vault = ""; | |
| /* Optional folder name such as "Clippings/" */ |
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
| public protocol ReusableView: class { } | |
| extension ReusableView where Self: UIView { | |
| public static var reuseIdentifier: String { | |
| return String(describing: self) | |
| } | |
| } | |
| extension UITableViewCell: ReusableView { } | |
| extension UITableViewHeaderFooterView: ReusableView { } |
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
| extension UIView { | |
| public func addSubviews(_ subviews: [UIView], tAMIC: Bool = false) { | |
| for subview in subviews { | |
| addSubview(subview) | |
| subview.translatesAutoresizingMaskIntoConstraints = false | |
| } | |
| } | |
| } |
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
| extension UIView { | |
| @discardableResult | |
| public func constrainEdges(to view: UIView) -> [NSLayoutConstraint] { | |
| let constraints = [ | |
| leadingAnchor.constraint(equalTo: view.leadingAnchor), | |
| topAnchor.constraint(equalTo: view.topAnchor), | |
| trailingAnchor.constraint(equalTo: view.trailingAnchor), | |
| bottomAnchor.constraint(equalTo: view.bottomAnchor) | |
| ] | |
| NSLayoutConstraint.activate(constraints) |