|
@@ -2449,6 +2449,17 @@ let LOCKED_KEY = "locked"
|
|
|
|
|
|
func pdfViewPerformURL(_ pdfView: CPDFView!, withContent content: String!) {
|
|
|
KMPrint("pdfViewPerformURL")
|
|
|
+ if content != nil {
|
|
|
+ NSWorkspace.shared.open(URL(string: content)!)
|
|
|
+ } else {
|
|
|
+ let alert = NSAlert()
|
|
|
+ alert.alertStyle = .critical
|
|
|
+ alert.informativeText = NSLocalizedString("The hyperlink is invalid.", comment: "")
|
|
|
+ alert.messageText = ""
|
|
|
+ alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
|
|
|
+ alert.runModal()
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func pdfViewPerformPrint(_ pdfView: CPDFView!) {
|