         configuration.preferences.javaScriptEnabled = true
         let js = Note.decodeRange + Note.installEffect + Note.encodeRange
         let script = WKUserScript(source: js, injectionTime: .atDocumentStart, forMainFrameOnly: false)
-        configuration.userContentController.addUserScript(script)
+        let contentController = WKUserContentController()
+        contentController.addUserScript(script)
+        contentController.add(self, name: "book")
+        contentController.add(self, name: "note")
+        configuration.userContentController = contentController
         self.webView = WKWebView(frame: self.view.bounds, configuration: configuration)
         self.webView.backgroundColor = AppFont.backgroundColor
         

import UIKit
import WebKit

class ReaderViewController : AppViewController, WKNavigationDelegate {
    
    private var webView: WKWebView!
    private var _reference: Reference!

        print("ERROR: Bible page load error \(withError)")
        NotificationCenter.default.post(name: ReaderPagesController.WEB_LOAD_DONE, object: nil)
    }
    
    //
    // WKScriptMessageHandler
    //
    func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
        if let noteId = message.body as? String {
            if message.name == "book" {
                print("click on book")
            }
            else if message.name == "note" {
                print("click on note")
            }
        }
    }
}
