Back/forward buttons, share button on iPad
This commit is contained in:
@@ -102,8 +102,7 @@ class ScriptPolicyViewController: UIViewController, UICollectionViewDelegate
|
||||
let otherOriginScripts = loadedScripts.subtracting([ hostOrigin ])
|
||||
let originItems = [ hostOrigin ] + otherOriginScripts
|
||||
|
||||
let switchCellRegistry = UICollectionView.CellRegistration<SwitchListCell, String> { [weak self] (listCell, indexPath, item) in
|
||||
guard let self = self else { return }
|
||||
let switchCellRegistry = UICollectionView.CellRegistration<SwitchListCell, String> { [unowned self] (listCell, indexPath, item) in
|
||||
var config = listCell.defaultContentConfiguration()
|
||||
if item == Self.enableScriptsForTabItem {
|
||||
config.text = "Allow for Tab"
|
||||
@@ -133,8 +132,7 @@ class ScriptPolicyViewController: UIViewController, UICollectionViewDelegate
|
||||
listCell.contentConfiguration = config
|
||||
}
|
||||
|
||||
let scriptPolicyRegistry = UICollectionView.CellRegistration<ScriptPolicyControlListCell, String> { [weak self] (listCell, indexPath, item) in
|
||||
guard let self = self else { return }
|
||||
let scriptPolicyRegistry = UICollectionView.CellRegistration<ScriptPolicyControlListCell, String> { [unowned self] (listCell, indexPath, item) in
|
||||
var config = listCell.defaultContentConfiguration()
|
||||
config.text = item
|
||||
|
||||
@@ -196,8 +194,7 @@ class ScriptPolicyViewController: UIViewController, UICollectionViewDelegate
|
||||
self.collectionView = collectionView
|
||||
|
||||
title = "Script Origin Policy"
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(systemItem: .done, primaryAction: UIAction(handler: { [weak self] action in
|
||||
guard let self = self else { return }
|
||||
navigationItem.rightBarButtonItem = UIBarButtonItem(systemItem: .done, primaryAction: UIAction(handler: { [unowned self] action in
|
||||
if self.didChangeScriptPolicy {
|
||||
self.delegate?.didChangeScriptPolicy()
|
||||
self.delegate?.setScriptsEnabledForTab(self.allowScriptsForTab)
|
||||
|
||||
Reference in New Issue
Block a user