mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
support for permalink and external url
Consolidate GetURL AppleEvent handling into AppDelegate+Scriptability file Add scripting access groups to sdef Add exists command Add ‘permalink’ and ‘external url’ properties to the article scripting object Add a unit test to verify the behavior of ‘current article’
This commit is contained in:
@@ -51,10 +51,20 @@ class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
|
||||
// MARK: --- Scriptable properties ---
|
||||
|
||||
@objc(url)
|
||||
var url:String {
|
||||
return article.url ?? ""
|
||||
var url:String? {
|
||||
return article.url ?? article.externalURL
|
||||
}
|
||||
|
||||
|
||||
@objc(permalink)
|
||||
var permalink:String? {
|
||||
return article.url
|
||||
}
|
||||
|
||||
@objc(externalUrl)
|
||||
var externalUrl:String? {
|
||||
return article.externalURL
|
||||
}
|
||||
|
||||
@objc(uniqueId)
|
||||
var uniqueId:String {
|
||||
return article.uniqueID
|
||||
|
||||
Reference in New Issue
Block a user