Skip to content

Commit

Permalink
🐎 Improve: Enhance existing functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
nookery committed Jan 17, 2025
1 parent eb75c43 commit f5a38c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"location" : "https://github.com/CofficLab/MagicKit.git",
"state" : {
"branch" : "dev",
"revision" : "5fe2985e11d23a76d9fd9598a52bd169a0dfe07f"
"revision" : "4d7d2ac23138eec9394beee4c5f8c815f7d61c6f"
}
},
{
Expand Down
13 changes: 2 additions & 11 deletions Sources/JuiceEditorKit/Views/EditorViewApi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ public extension EditorView {

@discardableResult
func disableDebugBar() async throws -> Any {
debug("disableDebugBar")
let result = try await run("window.editor.disableDebugBar()")
debug("disableDebugBar result: \(result)")
return result
try await run("window.editor.disableDebugBar()")
}

func disableFloatingMenuAndBubbleMenu() async throws -> Any {
Expand Down Expand Up @@ -273,13 +270,7 @@ public extension EditorView {
}

func run(_ script: String) async throws -> Any {
"nil"
// try await self.webView.content.run(script)
}

func evaluateJavaScript(_ script: String) async throws -> Any {
"nil"
// try await self.webView.content.evaluateJavaScript(script)
self.webView?.evaluateJavaScript(script)
}

func closeDraw() async throws -> Any {
Expand Down
1 change: 0 additions & 1 deletion Sources/JuiceEditorKit/Views/EditorViewEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ extension EditorView {
do {
try await self.setChatApi(server.chatApi)
try await self.setDrawLink(server.drawIoLink)
try await self.disableFloatingMenu()
try await self.disableDebugBar()

self.delegate.onReady()
Expand Down

0 comments on commit f5a38c0

Please sign in to comment.