Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring #26

Merged
merged 9 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run swiftlint --fix
  • Loading branch information
KS1019 committed Mar 3, 2022
commit 1a8916d21dc9fbc308672a14081f1f3af3479d9a
2 changes: 1 addition & 1 deletion Sources/Commands/List.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extension List {
#if canImport(AppKit)
guard !onSafari else {
let htmlFile = try Utils.generateHTML(from: jsFiles)
try NSWorkspace.shared.open([htmlFile.url], withApplicationAt: Constants.List.safariAppURL , configuration: [:])
try NSWorkspace.shared.open([htmlFile.url], withApplicationAt: Constants.List.safariAppURL, configuration: [:])
return
}
#endif
Expand Down
5 changes: 2 additions & 3 deletions Sources/Models/Bookmarklet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ public struct Bookmarklet {
public var uuid: String
public var title: String
public var url: String

public init(uuid: String, title: String, url: String) {
self.uuid = uuid
self.title = title
self.url = url
}


}

Expand All @@ -35,7 +34,7 @@ extension Bookmarklet {
let url = try? file.readAsString() else {
return nil
}

self.uuid = file.nameExcludingExtension.components(separatedBy: "+").first!
self.title = file.nameExcludingExtension.components(separatedBy: "+")[1]
self.url = url.withJSPrefix.minified
Expand Down