mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-28 06:07:40 +00:00
Refactor wiki.filterTiddlers()
Now we pass a widget instead of the current tiddler title. We can use widget.getVariable(“currentTiddler”) to get the current tiddler.
This commit is contained in:
@@ -43,7 +43,7 @@ CountWidget.prototype.execute = function() {
|
||||
this.filter = this.getAttribute("filter");
|
||||
// Execute the filter
|
||||
if(this.filter) {
|
||||
this.currentCount = this.wiki.filterTiddlers(this.filter,this.getVariable("currentTiddler")).length;
|
||||
this.currentCount = this.wiki.filterTiddlers(this.filter,this).length;
|
||||
} else {
|
||||
this.currentCount = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user