     
     var pendingPageName: String?
     
-    deinit {
-        self.webView.stopLoading()
-        self.webView.configuration.userContentController.removeScriptMessageHandlerForName(ImageBrowserScriptHandler.name)
-        self.webView.configuration.userContentController.removeScriptMessageHandlerForName(NavigationScriptMessageHandler.name)
-    }
-    
     override func viewDidLoad() {
         super.viewDidLoad()
         

        var browser = IDMPhotoBrowser(photos: [IDMPhoto(filePath: self.wiki.localImagePath(path))])
        browser.usePopAnimation = true
        self.presentViewController(browser, animated: true, completion: nil)
    }
}


        configuration.userContentController = userContentController
        
        self.webView = WKWebView(frame: self.view.bounds, configuration: configuration)
        self.webView.restorationIdentifier = "WikiWebView"
        self.webView.setTranslatesAutoresizingMaskIntoConstraints(false)
        self.webView.allowsBackForwardNavigationGestures = true
        self.webView.UIDelegate = self;
