Skip to content

Commit 7d74a0b

Browse files
committed
Patch reboot
1 parent 3abf990 commit 7d74a0b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

devdocs-macos/DocumentationViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ class DocumentationViewController: NSViewController {
195195
self.documentURL = URL(string: location)
196196
hideSearchControl()
197197
}
198+
199+
private func handleAppReboot() {
200+
webView.reload()
201+
}
198202
}
199203

200204
// MARK:- WKUIDelegate
@@ -256,6 +260,8 @@ extension DocumentationViewController: WKScriptMessageHandler {
256260
return
257261
}
258262
handleLocationNotification(args)
263+
case "appReboot":
264+
handleAppReboot()
259265
default:
260266
return
261267
}

devdocs-macos/user-scripts/integration.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
const app = await globalDefined('app')
2323
app.isMobile = () => false
2424
app.views.Mobile.detect = () => false
25+
app.reboot = () => {
26+
window.webkit.messageHandlers.vcBus.postMessage({
27+
type: 'appReboot'
28+
})
29+
}
2530

2631
window.matchMedia = original
2732
window.webkit.messageHandlers.vcBus.postMessage({ type: 'afterInit' })

0 commit comments

Comments
 (0)